Sign in
android
/
toolchain
/
rustc
/
ff3f07ae99a30006dd85b9d73084edd9355c9db6
/
.
/
src
/
test
/
ui
/
borrowck
/
borrowck-reinit.rs
blob: e8e38a92c81e943516c641a240d1f7e81b56556b [
file
] [
log
] [
blame
]
// compile-flags: -Z borrowck=compare
fn
main
()
{
let
mut
x
=
Box
::
new
(
0
);
let
_u
=
x
;
// error shouldn't note this move
x
=
Box
::
new
(
1
);
drop
(
x
);
let
_
=
(
1
,
x
);
//~ ERROR use of moved value: `x` (Ast)
//~^ ERROR use of moved value: `x` (Mir)
}