rust/tests/ui/compare-method/region-extra.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
271 B
Rust
Raw Normal View History

// Test that you cannot add an extra where clause in the impl relating
// two regions.
2016-10-03 20:00:09 +00:00
trait Master<'a, 'b> {
fn foo();
2016-10-03 20:00:09 +00:00
}
impl<'a, 'b> Master<'a, 'b> for () {
2017-11-20 12:13:27 +00:00
fn foo() where 'a: 'b { } //~ ERROR impl has stricter
2016-10-03 20:00:09 +00:00
}
fn main() {
println!("Hello, world!");
}