blob: 82c64bcf6a76789d64092c4e1fb2528f9cedfbdc (
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 method receiver
//~| expected type `Foo<'a, 'b>`
//~| found type `Foo<'b, 'a>`
//~| lifetime mismatch
//~| ERROR mismatched method receiver
//~| expected type `Foo<'a, 'b>`
//~| found type `Foo<'b, 'a>`
//~| lifetime mismatch
) {}
}
fn main() {}
|