Uh oh!
There was an error while loading. Please reload this page.
add implementation of Ord for Cell<T> and RefCell<T> where T: Ord - #33306
Conversation
rust-highfive
commented
May 1, 2016
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
jonas-schievink
commented
May 1, 2016
I think these sort of proxy impls for |
It is safe code. Borrow on |
jonas-schievink
commented
May 1, 2016
Of course it's safe, but it might be surprising. I don't think there's any other operator impl in the standard library that can panic.
Why isn't
The difference is that the I don't think it's too much of a hassle to have to write Regarding |
vadixidav
commented
May 1, 2016
Eq is implemented on RefCell. That will cause the same issue. To be consistent we should add this as well. |
jonas-schievink
commented
May 1, 2016
Huh, indeed. In that case, I agree that these should be added for consistency. Same for |
sfackler
commented
May 1, 2016
For historical context: #25744 |
alexcrichton
commented
May 1, 2016
I'd be fine merging this. This is just extending what we already have with |
alexcrichton
commented
May 11, 2016
The libs team discussed this during triage the other day and the conclusion was to merge. Thanks again for the PR @vadixidav! |
bors
commented
May 12, 2016
⌛ Testing commit 4dcb637 with merge 992bb13... |
add implementation of Ord for Cell<T> and RefCell<T> where T: Ord Raised this in issue #33305.
Raised this in issue #33305.