Rationale behind Rc::get_mut()

It's interesting to note that in theory it is possible to have a similar runtime check if we store "is borrowed mutably" flag. And this is exactly what RefCell does!

1 Like