Sign in
fuchsia
/
third_party
/
rust
/
0.4
/
.
/
src
/
test
/
run-pass
/
unique-copy-box.rs
blob: e0ea3e6c0a316b8411e7640151f9d580d3499d6c [
file
]
extern
mod
std
;
use
sys
::
refcount
;
fn
main
()
unsafe
{
let
i
=
~@
1
;
let
j
=
~@
2
;
let
rc1
=
refcount
(*
i
);
let
j
=
i
;
let
rc2
=
refcount
(*
i
);
error
!(
"rc1: %u rc2: %u"
,
rc1
,
rc2
);
assert
rc1
+
1u
==
rc2
;
}