rust/src/test/run-pass/unique-pinned-nocopy-2.rs
2012-03-26 18:35:18 -07:00

11 lines
134 B
Rust

resource r(i: @mut int) {
*i = *i + 1;
}
fn main() {
let i = @mut 0;
{
let j = ~r(i);
}
assert *i == 1;
}