mirror of
https://github.com/rust-lang/rust.git
synced 2026-01-21 01:30:41 +00:00
21 lines
459 B
Rust
21 lines
459 B
Rust
//@ dont-require-annotations: NOTE
|
|
|
|
struct Foo<'a> {
|
|
data: &'a[u8],
|
|
}
|
|
|
|
impl <'a> Foo<'a>{
|
|
fn bar(self: &mut Foo) {
|
|
//~^ ERROR mismatched `self` parameter type
|
|
//~| NOTE expected struct `Foo<'a>`
|
|
//~| NOTE found struct `Foo<'_>`
|
|
//~| NOTE lifetime mismatch
|
|
//~| ERROR mismatched `self` parameter type
|
|
//~| NOTE expected struct `Foo<'a>`
|
|
//~| NOTE found struct `Foo<'_>`
|
|
//~| NOTE lifetime mismatch
|
|
}
|
|
}
|
|
|
|
fn main() {}
|