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