Clarify docs of RefCell#103881
Conversation
Comparison operators only panic if the `RefCell` is mutably borrowed, and `RefCell::swap()` can also panic if swapping a `RefCell` with itself.
|
r? @m-ou-se (rustbot has picked a reviewer for you, use r? to override) |
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
|
These are good clarifications, afaict not controversial. r? @compiler-errors @bors r+ |
…r-errors Clarify docs of `RefCell` Comparison operators only panic if the `RefCell` is mutably borrowed, and `RefCell::swap()` can also panic if swapping a `RefCell` with itself.
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (9b889e5): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
|
Regression is definitely noise |
…errors Clarify docs of `RefCell` Comparison operators only panic if the `RefCell` is mutably borrowed, and `RefCell::swap()` can also panic if swapping a `RefCell` with itself.
Comparison operators only panic if the
RefCellis mutably borrowed, andRefCell::swap()can also panic if swapping aRefCellwith itself.