rust/src/test/run-pass/unique-copy-box.rs
Niko Matsakis 02d7a1e781 move sys fns into c-stack-cdecl and get_type_desc() into rusti
there is one test failure, stdtest/sys.rs, which inexplicably
(thus far) fails to compile because it invokes
sys::rustrt::last_os_error() instead of invoking
sys::last_os_error().  If stdtest/sys.rs is updated to invoke
the wrapper, it passes.  Still tracing the source of this error.
2011-10-24 16:06:17 -07:00

12 lines
237 B
Rust

use std;
import std::sys::refcount;
fn main() unsafe {
let i = ~@1;
let j = ~@2;
let rc1 = refcount(*i);
let j = i;
let rc2 = refcount(*i);
log_err #fmt("rc1: %u rc2: %u", rc1, rc2);
assert rc1 + 1u == rc2;
}