summaryrefslogtreecommitdiffstats
path: root/src/test/ui/compare-method/region-unrelated.rs
blob: 9730c9dfe6c98560aee8e63cd8a673a94ce60b62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 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 { }
    //~^ ERROR impl has stricter requirements than trait
}

fn main() {
    println!("Hello, world!");
}