2017-09-13 14:58:43 -05:00
|
|
|
struct Ref<'a> {
|
|
|
|
x: &'a u32,
|
|
|
|
}
|
|
|
|
|
|
|
|
fn foo<'a, 'b>(mut x: Vec<Ref<'a>>, y: Ref<'b>) {
|
2022-05-22 01:05:15 -05:00
|
|
|
x.push(y);
|
2022-04-01 12:13:25 -05:00
|
|
|
//~^ ERROR lifetime may not live long enough
|
2017-09-13 14:58:43 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|