rust/src/test/run-pass/issue-979.rs

12 lines
144 B
Rust
Raw Normal View History

2012-03-05 20:41:55 -06:00
resource r(b: @mutable int) {
*b += 1;
}
fn main() {
let b = @mutable 0;
{
let p = some(r(b));
}
assert *b == 1;
}