Sign in
fuchsia
/
third_party
/
rust
/
daafeb35b731a599fc8b6c4cf37b81f838dae319
/
.
/
src
/
test
/
ui
/
unique
/
unique-swap.rs
blob: 33a6b3b3ed046ae86c482b2b3eeb782c22c907b5 [
file
] [
log
] [
blame
]
// run-pass
#![
feature
(
box_syntax
)]
use
std
::
mem
::
swap
;
pub
fn
main
()
{
let
mut
i
:
Box
<
_
>
=
box
100
;
let
mut
j
:
Box
<
_
>
=
box
200
;
swap
(&
mut
i
,
&
mut
j
);
assert_eq
!(
i
,
box
200
);
assert_eq
!(
j
,
box
100
);
}