Uh oh!
There was an error while loading. Please reload this page.
RefCell: document panics in Clone, PartialEq, PartialOrd, Ord. - #48365
Conversation
rust-highfive
commented
Feb 20, 2018
(rust_highfive has picked a reviewer for you, use r? to override) |
Centril
commented
Feb 22, 2018
Re-assigning to a T-doc member =) |
emilyalbini
commented
Feb 26, 2018
@steveklabnik ping from the release team! |
| impl<T: ?Sized + PartialEq> PartialEq for RefCell<T> { | ||
| /// # Panics | ||
| /// | ||
| /// Panics if the value is currently mutably borrowed. |
There was a problem hiding this comment.
For the functions that take an other like this one, what do you think about using this wording:
Panics if the value in either
RefCellis currently borrowed.
This wording is taken from RefCell::swap
There was a problem hiding this comment.
Sounds like a great improvement 👍
There was a problem hiding this comment.
r=me after changing to @frewsxcv 's wording; consistency is important and i think it's slightly clearer. Thanks so much for this PR!
Centril
commented
Feb 27, 2018
@steveklabnik: Will do in a jiffy =) |
And fixed. |
frewsxcv
commented
Feb 27, 2018
@bors r+ rollup thanks! |
bors
commented
Feb 27, 2018
📌 Commit f8ebb3f has been approved by |
…s, r=frewsxcv RefCell: document panics in Clone, PartialEq, PartialOrd, Ord. This fixesrust-lang#47400 by adding: ```rust /// # Panics /// /// Panics if the value is currently mutably borrowed. ``` to said impls. They may panic since they call `.borrow()`.
This fixes#47400 by adding:
to said impls. They may panic since they call
.borrow().