fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1error[E0308]: mismatched `self` parameter type 2 --> $DIR/issue-17740.rs:6:18 3 | 4LL | fn bar(self: &mut Foo) { 5 | ^^^^^^^^ lifetime mismatch 6 | 7 = note: expected struct `Foo<'a>` 8 found struct `Foo<'_>` 9note: the anonymous lifetime #2 defined on the method body at 6:5... 10 --> $DIR/issue-17740.rs:6:5 11 | 12LL | / fn bar(self: &mut Foo) { 13LL | | 14LL | | 15LL | | 16... | 17LL | | 18LL | | } 19 | |_____^ 20note: ...does not necessarily outlive the lifetime `'a` as defined on the impl at 5:7 21 --> $DIR/issue-17740.rs:5:7 22 | 23LL | impl <'a> Foo<'a>{ 24 | ^^ 25 26error[E0308]: mismatched `self` parameter type 27 --> $DIR/issue-17740.rs:6:18 28 | 29LL | fn bar(self: &mut Foo) { 30 | ^^^^^^^^ lifetime mismatch 31 | 32 = note: expected struct `Foo<'a>` 33 found struct `Foo<'_>` 34note: the lifetime `'a` as defined on the impl at 5:7... 35 --> $DIR/issue-17740.rs:5:7 36 | 37LL | impl <'a> Foo<'a>{ 38 | ^^ 39note: ...does not necessarily outlive the anonymous lifetime #2 defined on the method body at 6:5 40 --> $DIR/issue-17740.rs:6:5 41 | 42LL | / fn bar(self: &mut Foo) { 43LL | | 44LL | | 45LL | | 46... | 47LL | | 48LL | | } 49 | |_____^ 50 51error: aborting due to 2 previous errors 52 53For more information about this error, try `rustc --explain E0308`.