mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
21 lines
455 B
Rust
21 lines
455 B
Rust
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() {}
|