Remove Rc's borrow method to avoid conflicts with RefCell's borrow in Rc<RefCell<T>>.
This commit is contained in:
parent
12b2607572
commit
cdc18b96d6
28 changed files with 59 additions and 76 deletions
|
|
@ -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.borrow();
|
||||
let b = v.deref();
|
||||
let mut b = b.borrow_mut();
|
||||
b.get().v.set(w.clone());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,5 +20,5 @@ pub fn main() {
|
|||
|
||||
let mut x = Rc::new(3);
|
||||
x = x;
|
||||
assert!(*x.borrow() == 3);
|
||||
assert!(*x.deref() == 3);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue