Sign in
fuchsia
/
third_party
/
rust
/
a10a02bf5fd00e4b34f1856af17d058dd5ec06f0
/
.
/
src
/
test
/
ui
/
error-codes
/
E0597.rs
blob: 7217e351281da18b37b9d07186199f635b8e4993 [
file
] [
log
] [
blame
]
struct
Foo
<
'
a
>
{
x
:
Option
<&
'
a u32
>,
}
fn
main
()
{
let
mut
x
=
Foo
{
x
:
None
};
let
y
=
0
;
x
.
x
=
Some
(&
y
);
//~^ `y` does not live long enough [E0597]
}
impl
<
'a> Drop for Foo<'
a
>
{
fn
drop
(&
mut
self
)
{
}
}