| error[E0277]: the trait bound `Rc<RefCell<S>>: Borrow<S>` is not satisfied |
| --> $DIR/shadowed-intrinsic-method-deref.rs:16:22 |
| | |
| LL | let sb : &S = &s.borrow(); |
| | ^^^^^^ the trait `Borrow<S>` is not implemented for `Rc<RefCell<S>>` |
| | |
| help: the trait `Borrow<S>` is not implemented for `Rc<RefCell<S>>` |
| but trait `Borrow<RefCell<S>>` is implemented for it |
| --> $SRC_DIR/alloc/src/rc.rs:LL:COL |
| = help: for that trait implementation, expected `RefCell<S>`, found `S` |
| = note: there's an inherent method on `RefCell<S>` of the same name, which can be auto-dereferenced from `&RefCell<T>` |
| help: to access the inherent method on `RefCell<S>`, use the fully-qualified path |
| | |
| LL - let sb : &S = &s.borrow(); |
| LL + let sb : &S = &RefCell::borrow(&s); |
| | |
| |
| error: aborting due to 1 previous error |
| |
| For more information about this error, try `rustc --explain E0277`. |