summary refs log tree commit diff
path: root/src/test/ui/explicit/explicit-self-lifetime-mismatch.rs
blob: 9ab8e13893bc77b5b63bfb9b575b7dd4fd843faa (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 type `Foo<'a, 'b>`
    //~| found type `Foo<'b, 'a>`
    //~| lifetime mismatch
    //~| ERROR mismatched `self` parameter type
    //~| expected type `Foo<'a, 'b>`
    //~| found type `Foo<'b, 'a>`
    //~| lifetime mismatch
           ) {}
}

fn main() {}