rust/src/test/run-pass/alt-implicit-copy-unique.rs
2012-12-05 17:38:21 -08:00

9 lines
172 B
Rust

fn main() {
let x = ~{mut a: ~10, b: ~20};
match x {
~{a: ref mut a, b: ref b} => {
assert **a == 10; (*x).a = ~30; assert **a == 30;
}
}
}