Closed
Description
When BorrowMut
is in scope and one has a rc: Rc<RefCell<X>>
a call to rc.borrow_mut()
does not deref into the inner RefCell
but uses the generic call returning a &mut Rc<...>
.
Something like this:
= note: expected type `&mut std::rc::Rc<std::cell::RefCell<X>>`
= note: found type `std::option::Option<_>`
The compiler should ideally give feedback that the trait was used instead of the deref and how to fix this issue.