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

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

16 lines
362 B
Rust
Raw Normal View History

2016-10-03 20:00:09 +00:00
// Test that we elaborate `Type: 'region` constraints and infer various important things.
trait Master<'a, T: ?Sized, U> {
fn foo() where T: 'a;
}
// `U: 'a` does not imply `V: 'a`
impl<'a, U, V> Master<'a, U, V> for () {
fn foo() where V: 'a { }
2017-11-20 12:13:27 +00:00
//~^ ERROR impl has stricter requirements than trait
2016-10-03 20:00:09 +00:00
}
fn main() {
println!("Hello, world!");
}