rust-lang/rust — pull request #15952 by aturon (2014-07-24 17:09:07+00:00)
Title: safety violation fix: RefCell::unwrap

The `unwrap` method for `RefCell` was using `debug_assert!` to check
that the `RefCell` was not aleady borrowed before unwrapping. However,
disabling this assertion can lead to safety violations.

This commit changes the code to fail explicitly with a useful message,
similarly to the `borrow` and `borrow_mut` methods.