|
1 |
| -error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements |
2 |
| - --> $DIR/issue-65230.rs:10:28 |
3 |
| - | |
4 |
| -LL | fn f(&self) -> Self::U { |
5 |
| - | ____________________________^ |
6 |
| -LL | | self.0 |
7 |
| -LL | | } |
8 |
| - | |_____^ |
9 |
| - | |
10 |
| -note: first, the lifetime cannot outlive the anonymous lifetime defined on the method body at 10:10... |
11 |
| - --> $DIR/issue-65230.rs:10:10 |
12 |
| - | |
13 |
| -LL | fn f(&self) -> Self::U { |
14 |
| - | ^^^^^ |
15 |
| -note: ...so that reference does not outlive borrowed content |
16 |
| - --> $DIR/issue-65230.rs:11:9 |
17 |
| - | |
18 |
| -LL | self.0 |
19 |
| - | ^^^^^^ |
20 |
| -note: but, the lifetime must be valid for the lifetime `'a` as defined on the impl at 8:6... |
| 1 | +error[E0308]: mismatched types |
21 | 2 | --> $DIR/issue-65230.rs:8:6
|
22 | 3 | |
|
23 |
| -LL | impl<'a> T for X<'a> { |
24 |
| - | ^^ |
25 |
| -note: ...so that the types are compatible |
26 |
| - --> $DIR/issue-65230.rs:10:28 |
| 4 | +LL | impl T1 for &dyn T2 {} |
| 5 | + | ^^ lifetime mismatch |
| 6 | + | |
| 7 | + = note: expected trait `<&dyn T2 as T0>` |
| 8 | + found trait `<&(dyn T2 + 'static) as T0>` |
| 9 | +note: the lifetime `'_` as defined on the impl at 8:13... |
| 10 | + --> $DIR/issue-65230.rs:8:13 |
27 | 11 | |
|
28 |
| -LL | fn f(&self) -> Self::U { |
29 |
| - | ____________________________^ |
30 |
| -LL | | self.0 |
31 |
| -LL | | } |
32 |
| - | |_____^ |
33 |
| - = note: expected `<X<'a> as T>` |
34 |
| - found `<X<'_> as T>` |
| 12 | +LL | impl T1 for &dyn T2 {} |
| 13 | + | ^ |
| 14 | + = note: ...does not necessarily outlive the static lifetime |
35 | 15 |
|
36 | 16 | error: aborting due to previous error
|
37 | 17 |
|
38 |
| -For more information about this error, try `rustc --explain E0495`. |
| 18 | +For more information about this error, try `rustc --explain E0308`. |
0 commit comments