Sign in
android
/
toolchain
/
rustc
/
d720b3f2ba07cb42ff7b311589c99daefe3aaa22
/
.
/
tests
/
ui
/
moves
/
move-arg-2-unique.rs
blob: 9622c83750d3ed1b12deea187869ade8eaddfb7b [
file
] [
log
] [
blame
]
// run-pass
fn
test
(
foo
:
Box
<
Vec
<
isize
>>
)
{
assert_eq
!((*
foo
)[
0
],
10
);
}
pub
fn
main
()
{
let
x
=
Box
::
new
(
vec
![
10
]);
// Test forgetting a local by move-in
test
(
x
);
// Test forgetting a temporary by move-in.
test
(
Box
::
new
(
vec
![
10
]));
}