]>
Commit | Line | Data |
---|---|---|
8faf50e0 | 1 | error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements |
0731742a | 2 | --> $DIR/issue-16683.rs:4:14 |
8faf50e0 | 3 | | |
532ac7d7 | 4 | LL | self.a(); |
8faf50e0 XL |
5 | | ^ |
6 | | | |
6a06907d XL |
7 | note: first, the lifetime cannot outlive the anonymous lifetime defined on the method body at 3:10... |
8 | --> $DIR/issue-16683.rs:3:10 | |
8faf50e0 | 9 | | |
3dfed10e | 10 | LL | fn b(&self) { |
6a06907d | 11 | | ^^^^^ |
8faf50e0 | 12 | note: ...so that reference does not outlive borrowed content |
0731742a | 13 | --> $DIR/issue-16683.rs:4:9 |
8faf50e0 | 14 | | |
532ac7d7 | 15 | LL | self.a(); |
8faf50e0 | 16 | | ^^^^ |
e74abb32 | 17 | note: but, the lifetime must be valid for the lifetime `'a` as defined on the trait at 1:9... |
0731742a | 18 | --> $DIR/issue-16683.rs:1:9 |
8faf50e0 XL |
19 | | |
20 | LL | trait T<'a> { | |
21 | | ^^ | |
60c5eb7d XL |
22 | note: ...so that the types are compatible |
23 | --> $DIR/issue-16683.rs:4:14 | |
24 | | | |
25 | LL | self.a(); | |
26 | | ^ | |
f9f354fc XL |
27 | = note: expected `&'a Self` |
28 | found `&Self` | |
8faf50e0 XL |
29 | |
30 | error: aborting due to previous error | |
31 | ||
e74abb32 | 32 | For more information about this error, try `rustc --explain E0495`. |