]> git.proxmox.com Git - rustc.git/blame - src/test/ui/regions/regions-free-region-ordering-incorrect.stderr
New upstream version 1.61.0+dfsg1
[rustc.git] / src / test / ui / regions / regions-free-region-ordering-incorrect.stderr
CommitLineData
b7449926 1error[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 4LL | None => &self.val
0731742a 5 | ^^^^^^^^^
b7449926 6 |
c295e0f8 7note: 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
10LL | fn get<'a>(&'a self) -> &'b T {
11 | ^^
b7449926 12note: ...so that reference does not outlive borrowed content
0731742a 13 --> $DIR/regions-free-region-ordering-incorrect.rs:17:21
b7449926 14 |
532ac7d7 15LL | None => &self.val
0731742a 16 | ^^^^^^^^^
c295e0f8 17note: 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 |
20LL | impl<'b, T> Node<'b, T> {
21 | ^^
22note: ...so that reference does not outlive borrowed content
0731742a 23 --> $DIR/regions-free-region-ordering-incorrect.rs:15:9
b7449926 24 |
0731742a
XL
25LL | / match self.next {
26LL | | Some(ref next) => next.get(),
532ac7d7 27LL | | None => &self.val
0731742a
XL
28LL | | }
29 | |_________^
b7449926
XL
30
31error: aborting due to previous error
32
e74abb32 33For more information about this error, try `rustc --explain E0495`.