fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements 2 --> $DIR/issue-17758.rs:7:14 3 | 4LL | self.foo(); 5 | ^^^ 6 | 7note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 6:5... 8 --> $DIR/issue-17758.rs:6:5 9 | 10LL | / fn bar(&self) { 11LL | | self.foo(); 12LL | | 13LL | | } 14 | |_____^ 15note: ...so that reference does not outlive borrowed content 16 --> $DIR/issue-17758.rs:7:9 17 | 18LL | self.foo(); 19 | ^^^^ 20note: but, the lifetime must be valid for the lifetime `'a` as defined on the trait at 4:11... 21 --> $DIR/issue-17758.rs:4:11 22 | 23LL | trait Foo<'a> { 24 | ^^ 25note: ...so that the types are compatible 26 --> $DIR/issue-17758.rs:7:14 27 | 28LL | self.foo(); 29 | ^^^ 30 = note: expected `&'a Self` 31 found `&Self` 32 33error: aborting due to previous error 34 35For more information about this error, try `rustc --explain E0495`.