]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-17740.stderr
Rollup merge of #75837 - GuillaumeGomez:fix-font-color-help-button, r=Cldfire
[rust.git] / src / test / ui / issues / issue-17740.stderr
1 error[E0308]: mismatched `self` parameter type
2   --> $DIR/issue-17740.rs:6:18
3    |
4 LL |     fn bar(self: &mut Foo) {
5    |                  ^^^^^^^^ lifetime mismatch
6    |
7    = note: expected struct `Foo<'a>`
8               found struct `Foo<'_>`
9 note: the anonymous lifetime #2 defined on the method body at 6:5...
10   --> $DIR/issue-17740.rs:6:5
11    |
12 LL |     fn bar(self: &mut Foo) {
13    |     ^^^^^^^^^^^^^^^^^^^^^^
14 note: ...does not necessarily outlive the lifetime `'a` as defined on the impl at 5:7
15   --> $DIR/issue-17740.rs:5:7
16    |
17 LL | impl <'a> Foo<'a>{
18    |       ^^
19
20 error[E0308]: mismatched `self` parameter type
21   --> $DIR/issue-17740.rs:6:18
22    |
23 LL |     fn bar(self: &mut Foo) {
24    |                  ^^^^^^^^ lifetime mismatch
25    |
26    = note: expected struct `Foo<'a>`
27               found struct `Foo<'_>`
28 note: the lifetime `'a` as defined on the impl at 5:7...
29   --> $DIR/issue-17740.rs:5:7
30    |
31 LL | impl <'a> Foo<'a>{
32    |       ^^
33 note: ...does not necessarily outlive the anonymous lifetime #2 defined on the method body at 6:5
34   --> $DIR/issue-17740.rs:6:5
35    |
36 LL |     fn bar(self: &mut Foo) {
37    |     ^^^^^^^^^^^^^^^^^^^^^^
38
39 error: aborting due to 2 previous errors
40
41 For more information about this error, try `rustc --explain E0308`.