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