1 error[E0308]: mismatched method receiver
2 --> $DIR/issue-17740.rs:16:18
4 LL | fn bar(self: &mut Foo) {
5 | ^^^^^^^^ lifetime mismatch
7 = note: expected type `Foo<'a>`
9 note: the anonymous lifetime #2 defined on the method body at 16:5...
10 --> $DIR/issue-17740.rs:16:5
12 LL | / fn bar(self: &mut Foo) {
13 LL | | //~^ mismatched method receiver
14 LL | | //~| expected type `Foo<'a>`
15 LL | | //~| found type `Foo<'_>`
17 LL | | //~| lifetime mismatch
20 note: ...does not necessarily outlive the lifetime 'a as defined on the impl at 15:7
21 --> $DIR/issue-17740.rs:15:7
23 LL | impl <'a> Foo<'a>{
26 error[E0308]: mismatched method receiver
27 --> $DIR/issue-17740.rs:16:18
29 LL | fn bar(self: &mut Foo) {
30 | ^^^^^^^^ lifetime mismatch
32 = note: expected type `Foo<'a>`
34 note: the lifetime 'a as defined on the impl at 15:7...
35 --> $DIR/issue-17740.rs:15:7
37 LL | impl <'a> Foo<'a>{
39 note: ...does not necessarily outlive the anonymous lifetime #2 defined on the method body at 16:5
40 --> $DIR/issue-17740.rs:16:5
42 LL | / fn bar(self: &mut Foo) {
43 LL | | //~^ mismatched method receiver
44 LL | | //~| expected type `Foo<'a>`
45 LL | | //~| found type `Foo<'_>`
47 LL | | //~| lifetime mismatch
51 error: aborting due to 2 previous errors
53 For more information about this error, try `rustc --explain E0308`.