]>
Commit | Line | Data |
---|---|---|
48663c56 | 1 | error: lifetime may not live long enough |
04454e1e | 2 | --> $DIR/regions-free-region-ordering-incorrect.rs:19:9 |
48663c56 XL |
3 | | |
4 | LL | impl<'b, T> Node<'b, T> { | |
5 | | -- lifetime `'b` defined here | |
6 | LL | fn get<'a>(&'a self) -> &'b T { | |
7 | | -- lifetime `'a` defined here | |
8 | LL | / match self.next { | |
9 | LL | | Some(ref next) => next.get(), | |
10 | LL | | None => &self.val | |
11 | LL | | } | |
5099ac24 | 12 | | |_________^ associated function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a` |
60c5eb7d XL |
13 | | |
14 | = help: consider adding the following bound: `'a: 'b` | |
48663c56 XL |
15 | |
16 | error: aborting due to previous error | |
17 |