]>
Commit | Line | Data |
---|---|---|
32a655c1 SL |
1 | struct Ref<'a, T: 'a> { |
2 | data: &'a T | |
a7813a04 XL |
3 | } |
4 | ||
32a655c1 | 5 | fn foo<'a, 'b, 'c>(x: &'a mut Vec<Ref<'b, i32>>, y: Ref<'c, i32>) { |
923072b8 | 6 | let a: &mut Vec<Ref<i32>> = x; |
32a655c1 SL |
7 | let b = Ref { data: y.data }; |
8 | Vec::push(a, b); | |
923072b8 | 9 | //~^ ERROR lifetime may not live long enough |
54a0048b | 10 | } |
3157f602 | 11 | |
32a655c1 | 12 | fn main() { } |