summary refs log tree commit diff
path: root/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.nll.stderr
blob: fbefa1f5667c75c5e60acb2a1cbf37b1cbe68c8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
error: lifetime may not live long enough
  --> $DIR/ex2c-push-inference-variable.rs:7:5
   |
LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec<Ref<'b, i32>>, y: Ref<'c, i32>) {
   |            --  -- lifetime `'c` defined here
   |            |
   |            lifetime `'b` defined here
LL |     let z = Ref { data: y.data };
LL |     x.push(z);
   |     ^^^^^^^^^ argument requires that `'c` must outlive `'b`

error: aborting due to previous error