librustc: Disallow &mut loans from overlapping with any other loans

This commit is contained in:
Patrick Walton 2013-01-17 16:15:08 -08:00
parent 163b97b7bb
commit bbbb80559c
4 changed files with 15 additions and 10 deletions

View file

@ -12,7 +12,7 @@ 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;
assert **a == 10; *a = ~30; assert **a == 30;
}
}
}