Sign in
rust
/
rust-lang
/
rust
/
refs/heads/perf-tmp
/
.
/
tests
/
ui
/
lifetimes
/
lifetime-errors
/
ex2e-push-inference-variable-3.rs
blob: 498cea368247372db472fed8d32dac51f2afee07 [
file
] [
log
] [
blame
]
struct
Ref
<
'a, T: '
a
>
{
data
:
&
'
a T
}
fn
foo
<
'a, '
b
,
'c>(x: &'
a
mut
Vec
<
Ref
<
'b, i32>>, y: Ref<'
c
,
i32
>)
{
let
a
:
&
mut
Vec
<
Ref
<
i32
>>
=
x
;
//~^ ERROR lifetime may not live long enough
let
b
=
Ref
{
data
:
y
.
data
};
Vec
::
push
(
a
,
b
);
}
fn
main
()
{
}