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 15:00:09 -05: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 06:13:27 -06:00
//~^ ERROR impl has stricter requirements than trait
2016-10-03 15:00:09 -05:00
}
fn main() {
println!("Hello, world!");
}