rustc: Remove all usage of manual deref()

Favor using '*' instead
This commit is contained in:
Alex Crichton 2014-03-20 22:10:44 -07:00
parent 76f0b1ad1f
commit 3fb1ed0e04
27 changed files with 61 additions and 68 deletions

View file

@ -40,7 +40,7 @@ fn main()
//~^ ERROR cannot pack type `~B`, which does not fulfill `Send`
let v = Rc::new(RefCell::new(a));
let w = v.clone();
let b = v.deref();
let b = &*v;
let mut b = b.borrow_mut();
b.v.set(w.clone());
}

View file

@ -20,5 +20,5 @@ pub fn main() {
let mut x = Rc::new(3);
x = x;
assert!(*x.deref() == 3);
assert!(*x == 3);
}