rust/src/test/run-pass/unique-assign-drop.rs

7 lines
119 B
Rust

fn main() {
let i = ~1;
let j = ~2;
// Should drop the previous value of j
j = i;
assert *j == 1;
}