]>
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 | | | |
0731742a XL |
7 | note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 6:5... |
8 | --> $DIR/issue-17758.rs:6:5 | |
8faf50e0 XL |
9 | | |
10 | LL | / fn bar(&self) { | |
11 | LL | | self.foo(); | |
532ac7d7 | 12 | LL | | |
8faf50e0 XL |
13 | LL | | } |
14 | | |_____^ | |
15 | note: ...so that reference does not outlive borrowed content | |
0731742a | 16 | --> $DIR/issue-17758.rs:7:9 |
8faf50e0 XL |
17 | | |
18 | LL | self.foo(); | |
19 | | ^^^^ | |
e74abb32 | 20 | note: but, the lifetime must be valid for the lifetime `'a` as defined on the trait at 4:11... |
0731742a | 21 | --> $DIR/issue-17758.rs:4:11 |
8faf50e0 XL |
22 | | |
23 | LL | trait Foo<'a> { | |
24 | | ^^ | |
60c5eb7d XL |
25 | note: ...so that the types are compatible |
26 | --> $DIR/issue-17758.rs:7:14 | |
27 | | | |
28 | LL | self.foo(); | |
29 | | ^^^ | |
30 | = note: expected `&'a Self` | |
31 | found `&Self` | |
8faf50e0 XL |
32 | |
33 | error: aborting due to previous error | |
34 | ||
e74abb32 | 35 | For more information about this error, try `rustc --explain E0495`. |