2022-12-25 23:50:30 -06:00
error[E0308]: mismatched types
--> $DIR/shadowed-lplace-method.rs:9:24
|
LL | *rc.borrow_mut() = false;
2023-01-02 20:00:33 -06:00
| ---------------- ^^^^^ expected `Rc<RefCell<bool>>`, found `bool`
2022-12-25 23:50:30 -06:00
| |
| expected due to the type of this binding
|
= note: expected struct `Rc<RefCell<bool>>`
found type `bool`
2022-12-26 14:00:22 -06:00
note: the `borrow_mut` call is resolved to the method in `std::borrow::BorrowMut`, shadowing the method of the same name on the inherent impl for `std::cell::RefCell<T>`
2022-12-25 23:50:30 -06:00
--> $DIR/shadowed-lplace-method.rs:9:9
|
2022-12-26 14:00:22 -06:00
LL | use std::borrow::BorrowMut;
| ---------------------- `std::borrow::BorrowMut` imported here
...
2022-12-25 23:50:30 -06:00
LL | *rc.borrow_mut() = false;
| ^^^^^^^^^^ refers to `std::borrow::BorrowMut::borrow_mut`
2022-12-26 14:00:22 -06:00
help: you might have meant to call the other method; you can use the fully-qualified path to call it explicitly
2022-12-25 23:50:30 -06:00
|
LL | *std::cell::RefCell::<_>::borrow_mut(&rc) = false;
| +++++++++++++++++++++++++++++++++++++ ~
2023-11-21 09:44:16 -06:00
error: aborting due to 1 previous error
2022-12-25 23:50:30 -06:00
For more information about this error, try `rustc --explain E0308`.