Sign in
fuchsia
/
third_party
/
rust
/
3c2fd1a72d2e8cc80b354b4d2dd7931a7afe1b02
/
.
/
src
/
test
/
ui
/
lifetimes
/
lifetime-errors
/
ex2d-push-inference-variable-2.rs
blob: ee77d9e7fde1a03ada8ddbbd7b1685729284bfcd [
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 mismatch
let
b
=
Ref
{
data
:
y
.
data
};
a
.
push
(
b
);
}
fn
main
()
{
}