rust/tests/ui/explicit/explicit-self-lifetime-mismatch.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
455 B
Rust
Raw Normal View History

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>`
2015-01-12 00:01:44 -06:00
//~| lifetime mismatch
//~| ERROR mismatched `self` parameter type
//~| expected struct `Foo<'a, 'b>`
//~| found struct `Foo<'b, 'a>`
2015-01-12 00:01:44 -06:00
//~| lifetime mismatch
) {}
}
fn main() {}