Sign in
android
/
toolchain
/
rustc
/
ff3f07ae99a30006dd85b9d73084edd9355c9db6
/
.
/
src
/
test
/
ui
/
span
/
borrowck-ref-into-rvalue.rs
blob: aeaebf073a708f967fdc51f3bb92e0433153d57c [
file
] [
log
] [
blame
]
fn
main
()
{
let
msg
;
match
Some
(
"Hello"
.
to_string
())
{
Some
(
ref
m
)
=>
{
//~^ ERROR borrowed value does not live long enough
msg
=
m
;
},
None
=>
{
panic
!()
}
}
println
!(
"{}"
,
*
msg
);
}