summaryrefslogtreecommitdiffstats
path: root/tests/ui/explicit/explicit-self-lifetime-mismatch.rs
blob: a9a6f50fb8ea5f5ec79eb01f12f70f3501dc8f77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
struct Foo<'a,'b> {
    x: &'a isize,
    y: &'b isize,
}

impl<'a,'b> Foo<'a,'b> {
    fn bar(self:
           Foo<'b,'a>
    //~^ ERROR mismatched `self` parameter type
    //~| expected struct `Foo<'a, 'b>`
    //~| found struct `Foo<'b, 'a>`
    //~| lifetime mismatch
    //~| ERROR mismatched `self` parameter type
    //~| expected struct `Foo<'a, 'b>`
    //~| found struct `Foo<'b, 'a>`
    //~| lifetime mismatch
           ) {}
}

fn main() {}