1 error[E0495]: cannot infer an appropriate lifetime for borrow expression due to conflicting requirements
2 --> $DIR/regions-free-region-ordering-incorrect.rs:27:15
4 LL | None => &self.val //~ ERROR cannot infer
7 note: first, the lifetime cannot outlive the lifetime 'a as defined on the method body at 24:10...
8 --> $DIR/regions-free-region-ordering-incorrect.rs:24:10
10 LL | fn get<'a>(&'a self) -> &'b T {
12 note: ...so that reference does not outlive borrowed content
13 --> $DIR/regions-free-region-ordering-incorrect.rs:27:15
15 LL | None => &self.val //~ ERROR cannot infer
17 note: but, the lifetime must be valid for the lifetime 'b as defined on the impl at 23:6...
18 --> $DIR/regions-free-region-ordering-incorrect.rs:23:6
20 LL | impl<'b, T> Node<'b, T> {
22 note: ...so that reference does not outlive borrowed content
23 --> $DIR/regions-free-region-ordering-incorrect.rs:25:5
25 LL | / match self.next {
26 LL | | Some(ref next) => next.get(),
27 LL | | None => &self.val //~ ERROR cannot infer
31 error: aborting due to previous error
33 For more information about this error, try `rustc --explain E0495`.