Sign in
rust
/
rust-lang
/
rust
/
refs/heads/stable
/
.
/
tests
/
ui
/
lifetimes
/
lifetime-errors
/
ex3-both-anon-regions-one-is-struct-2.rs
blob: e4df870bc00311a398b3adc5d4a81a35abb1f2a9 [
file
] [
log
] [
blame
] [
edit
]
struct
Ref
<
'a, '
b
>
{
a
:
&
'a u32, b: &'
b u32
}
fn
foo
(
mut
x
:
Ref
,
y
:
&
u32
)
{
y
=
x
.
b
;
//~^ ERROR lifetime may not live long enough
//~| ERROR cannot assign to immutable argument
}
fn
main
()
{
}