]> git.lizzy.rs Git - rust.git/blob - tests/ui/explicit/explicit-self-lifetime-mismatch.rs
Rollup merge of #106323 - starkat99:stabilize-f16c_target_feature, r=petrochenkov
[rust.git] / tests / ui / explicit / explicit-self-lifetime-mismatch.rs
1 struct Foo<'a,'b> {
2     x: &'a isize,
3     y: &'b isize,
4 }
5
6 impl<'a,'b> Foo<'a,'b> {
7     fn bar(self:
8            Foo<'b,'a>
9     //~^ ERROR mismatched `self` parameter type
10     //~| expected struct `Foo<'a, 'b>`
11     //~| found struct `Foo<'b, 'a>`
12     //~| lifetime mismatch
13     //~| ERROR mismatched `self` parameter type
14     //~| expected struct `Foo<'a, 'b>`
15     //~| found struct `Foo<'b, 'a>`
16     //~| lifetime mismatch
17            ) {}
18 }
19
20 fn main() {}