]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-17740.stderr
Auto merge of #64080 - estebank:parse-format-comma, r=zackmdavis
[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 type `Foo<'a>`
8               found type `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 LL | |
14 LL | |
15 LL | |
16 ...  |
17 LL | |
18 LL | |     }
19    | |_____^
20 note: ...does not necessarily outlive the lifetime 'a as defined on the impl at 5:7
21   --> $DIR/issue-17740.rs:5:7
22    |
23 LL | impl <'a> Foo<'a>{
24    |       ^^
25
26 error[E0308]: mismatched `self` parameter type
27   --> $DIR/issue-17740.rs:6:18
28    |
29 LL |     fn bar(self: &mut Foo) {
30    |                  ^^^^^^^^ lifetime mismatch
31    |
32    = note: expected type `Foo<'a>`
33               found type `Foo<'_>`
34 note: the lifetime 'a as defined on the impl at 5:7...
35   --> $DIR/issue-17740.rs:5:7
36    |
37 LL | impl <'a> Foo<'a>{
38    |       ^^
39 note: ...does not necessarily outlive the anonymous lifetime #2 defined on the method body at 6:5
40   --> $DIR/issue-17740.rs:6:5
41    |
42 LL | /     fn bar(self: &mut Foo) {
43 LL | |
44 LL | |
45 LL | |
46 ...  |
47 LL | |
48 LL | |     }
49    | |_____^
50
51 error: aborting due to 2 previous errors
52
53 For more information about this error, try `rustc --explain E0308`.