Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
box
/
unit
/
unique-decl-init-copy.rs
blob: abb1113ebdc2af9e7dd347969460cf6272a5371a [
file
] [
log
] [
blame
] [
edit
]
//@ run-pass
pub
fn
main
()
{
let
mut
i
:
Box
<
_
>
=
Box
::
new
(
1
);
// Should be a copy
let
mut
j
=
i
.
clone
();
*
i
=
2
;
*
j
=
3
;
assert_eq
!(*
i
,
2
);
assert_eq
!(*
j
,
3
);
}