|
1 | 1 | error[E0308]: mismatched `self` parameter type |
2 | | - --> $DIR/explicit-self-lifetime-mismatch.rs:10:12 |
| 2 | + --> $DIR/explicit-self-lifetime-mismatch.rs:10:15 |
3 | 3 | | |
4 | | -LL | Foo<'b,'a> |
5 | | - | ^^^^^^^^^^ lifetime mismatch |
| 4 | +LL | self: Foo<'b, 'a>, |
| 5 | + | ^^^^^^^^^^^ lifetime mismatch |
6 | 6 | | |
7 | 7 | = note: expected struct `Foo<'a, 'b>` |
8 | 8 | found struct `Foo<'b, 'a>` |
9 | 9 | note: the lifetime `'b` as defined here... |
10 | | - --> $DIR/explicit-self-lifetime-mismatch.rs:8:9 |
| 10 | + --> $DIR/explicit-self-lifetime-mismatch.rs:8:10 |
11 | 11 | | |
12 | | -LL | impl<'a,'b> Foo<'a,'b> { |
13 | | - | ^^ |
| 12 | +LL | impl<'a, 'b> Foo<'a, 'b> { |
| 13 | + | ^^ |
14 | 14 | note: ...does not necessarily outlive the lifetime `'a` as defined here |
15 | 15 | --> $DIR/explicit-self-lifetime-mismatch.rs:8:6 |
16 | 16 | | |
17 | | -LL | impl<'a,'b> Foo<'a,'b> { |
| 17 | +LL | impl<'a, 'b> Foo<'a, 'b> { |
18 | 18 | | ^^ |
19 | 19 |
|
20 | 20 | error[E0308]: mismatched `self` parameter type |
21 | | - --> $DIR/explicit-self-lifetime-mismatch.rs:10:12 |
| 21 | + --> $DIR/explicit-self-lifetime-mismatch.rs:10:15 |
22 | 22 | | |
23 | | -LL | Foo<'b,'a> |
24 | | - | ^^^^^^^^^^ lifetime mismatch |
| 23 | +LL | self: Foo<'b, 'a>, |
| 24 | + | ^^^^^^^^^^^ lifetime mismatch |
25 | 25 | | |
26 | 26 | = note: expected struct `Foo<'a, 'b>` |
27 | 27 | found struct `Foo<'b, 'a>` |
28 | 28 | note: the lifetime `'a` as defined here... |
29 | 29 | --> $DIR/explicit-self-lifetime-mismatch.rs:8:6 |
30 | 30 | | |
31 | | -LL | impl<'a,'b> Foo<'a,'b> { |
| 31 | +LL | impl<'a, 'b> Foo<'a, 'b> { |
32 | 32 | | ^^ |
33 | 33 | note: ...does not necessarily outlive the lifetime `'b` as defined here |
34 | | - --> $DIR/explicit-self-lifetime-mismatch.rs:8:9 |
| 34 | + --> $DIR/explicit-self-lifetime-mismatch.rs:8:10 |
35 | 35 | | |
36 | | -LL | impl<'a,'b> Foo<'a,'b> { |
37 | | - | ^^ |
| 36 | +LL | impl<'a, 'b> Foo<'a, 'b> { |
| 37 | + | ^^ |
38 | 38 |
|
39 | | -error: aborting due to 2 previous errors |
| 39 | +error[E0308]: mismatched `self` parameter type |
| 40 | + --> $DIR/explicit-self-lifetime-mismatch.rs:28:18 |
| 41 | + | |
| 42 | +LL | fn bar(self: &mut Bar) { |
| 43 | + | ^^^^^^^^ lifetime mismatch |
| 44 | + | |
| 45 | + = note: expected struct `Bar<'a>` |
| 46 | + found struct `Bar<'_>` |
| 47 | +note: the anonymous lifetime defined here... |
| 48 | + --> $DIR/explicit-self-lifetime-mismatch.rs:28:23 |
| 49 | + | |
| 50 | +LL | fn bar(self: &mut Bar) { |
| 51 | + | ^^^ |
| 52 | +note: ...does not necessarily outlive the lifetime `'a` as defined here |
| 53 | + --> $DIR/explicit-self-lifetime-mismatch.rs:27:6 |
| 54 | + | |
| 55 | +LL | impl<'a> Bar<'a> { |
| 56 | + | ^^ |
| 57 | + |
| 58 | +error[E0308]: mismatched `self` parameter type |
| 59 | + --> $DIR/explicit-self-lifetime-mismatch.rs:28:18 |
| 60 | + | |
| 61 | +LL | fn bar(self: &mut Bar) { |
| 62 | + | ^^^^^^^^ lifetime mismatch |
| 63 | + | |
| 64 | + = note: expected struct `Bar<'a>` |
| 65 | + found struct `Bar<'_>` |
| 66 | +note: the lifetime `'a` as defined here... |
| 67 | + --> $DIR/explicit-self-lifetime-mismatch.rs:27:6 |
| 68 | + | |
| 69 | +LL | impl<'a> Bar<'a> { |
| 70 | + | ^^ |
| 71 | +note: ...does not necessarily outlive the anonymous lifetime defined here |
| 72 | + --> $DIR/explicit-self-lifetime-mismatch.rs:28:23 |
| 73 | + | |
| 74 | +LL | fn bar(self: &mut Bar) { |
| 75 | + | ^^^ |
| 76 | + |
| 77 | +error: aborting due to 4 previous errors |
40 | 78 |
|
41 | 79 | For more information about this error, try `rustc --explain E0308`. |
0 commit comments