Sign in
fuchsia
/
third_party
/
rust
/
f233a4c18bec906dab0b8531f326a15fadece547
/
.
/
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
);
}