summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions/regions-free-region-ordering-incorrect.stderr
blob: d0ceaec3b67d5e9fd30fa4f5f46d98bc69737bf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
error: lifetime may not live long enough
  --> $DIR/regions-free-region-ordering-incorrect.rs:15:9
   |
LL |   impl<'b, T> Node<'b, T> {
   |        -- lifetime `'b` defined here
LL |       fn get<'a>(&'a self) -> &'b T {
   |              -- lifetime `'a` defined here
LL | /         match self.next {
LL | |             Some(ref next) => next.get(),
LL | |             None => &self.val
LL | |         }
   | |_________^ method was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
   |
   = help: consider adding the following bound: `'a: 'b`

error: aborting due to previous error