]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-17740.rs
Consider privacy more carefully when suggesting accessing fields
[rust.git] / src / test / ui / issues / issue-17740.rs
1 struct Foo<'a> {
2     data: &'a[u8],
3 }
4
5 impl <'a> Foo<'a>{
6     fn bar(self: &mut Foo) {
7     //~^ mismatched `self` parameter type
8     //~| expected struct `Foo<'a>`
9     //~| found struct `Foo<'_>`
10     //~| lifetime mismatch
11     //~| mismatched `self` parameter type
12     //~| expected struct `Foo<'a>`
13     //~| found struct `Foo<'_>`
14     //~| lifetime mismatch
15     }
16 }
17
18 fn main() {}