]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0495]: cannot infer an appropriate lifetime for borrow expression due to conflicting requirements |
0731742a | 2 | --> $DIR/regions-free-region-ordering-incorrect.rs:17:21 |
b7449926 | 3 | | |
532ac7d7 | 4 | LL | None => &self.val |
0731742a | 5 | | ^^^^^^^^^ |
b7449926 | 6 | | |
c295e0f8 | 7 | note: first, the lifetime cannot outlive the lifetime `'a` as defined here... |
0731742a | 8 | --> $DIR/regions-free-region-ordering-incorrect.rs:14:12 |
b7449926 | 9 | | |
0731742a XL |
10 | LL | fn get<'a>(&'a self) -> &'b T { |
11 | | ^^ | |
b7449926 | 12 | note: ...so that reference does not outlive borrowed content |
0731742a | 13 | --> $DIR/regions-free-region-ordering-incorrect.rs:17:21 |
b7449926 | 14 | | |
532ac7d7 | 15 | LL | None => &self.val |
0731742a | 16 | | ^^^^^^^^^ |
c295e0f8 | 17 | note: but, the lifetime must be valid for the lifetime `'b` as defined here... |
0731742a | 18 | --> $DIR/regions-free-region-ordering-incorrect.rs:13:6 |
b7449926 XL |
19 | | |
20 | LL | impl<'b, T> Node<'b, T> { | |
21 | | ^^ | |
22 | note: ...so that reference does not outlive borrowed content | |
0731742a | 23 | --> $DIR/regions-free-region-ordering-incorrect.rs:15:9 |
b7449926 | 24 | | |
0731742a XL |
25 | LL | / match self.next { |
26 | LL | | Some(ref next) => next.get(), | |
532ac7d7 | 27 | LL | | None => &self.val |
0731742a XL |
28 | LL | | } |
29 | | |_________^ | |
b7449926 XL |
30 | |
31 | error: aborting due to previous error | |
32 | ||
e74abb32 | 33 | For more information about this error, try `rustc --explain E0495`. |