wip---work on making rooting work properly

This commit is contained in:
Niko Matsakis 2013-05-01 13:48:00 -04:00
parent 3159335ac3
commit 38f93f2121
8 changed files with 178 additions and 120 deletions

View file

@ -40,10 +40,11 @@ fn b() {
let q = &mut p;
p + 3; // ok for pure fns
p + 3; //~ ERROR cannot borrow `p`
p.times(3); //~ ERROR cannot borrow `p`
q.x += 1;
*q + 3; // OK to use the new alias `q`
q.x += 1; // and OK to mutate it
}
fn c() {