]>
Commit | Line | Data |
---|---|---|
8faf50e0 | 1 | error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements |
0731742a | 2 | --> $DIR/issue-17758.rs:7:14 |
8faf50e0 XL |
3 | | |
4 | LL | self.foo(); | |
5 | | ^^^ | |
6 | | | |
6a06907d XL |
7 | note: first, the lifetime cannot outlive the anonymous lifetime defined on the method body at 6:12... |
8 | --> $DIR/issue-17758.rs:6:12 | |
8faf50e0 | 9 | | |
3dfed10e | 10 | LL | fn bar(&self) { |
6a06907d | 11 | | ^^^^^ |
8faf50e0 | 12 | note: ...so that reference does not outlive borrowed content |
0731742a | 13 | --> $DIR/issue-17758.rs:7:9 |
8faf50e0 XL |
14 | | |
15 | LL | self.foo(); | |
16 | | ^^^^ | |
e74abb32 | 17 | note: but, the lifetime must be valid for the lifetime `'a` as defined on the trait at 4:11... |
0731742a | 18 | --> $DIR/issue-17758.rs:4:11 |
8faf50e0 XL |
19 | | |
20 | LL | trait Foo<'a> { | |
21 | | ^^ | |
60c5eb7d XL |
22 | note: ...so that the types are compatible |
23 | --> $DIR/issue-17758.rs:7:14 | |
24 | | | |
25 | LL | self.foo(); | |
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`. |