Add PartialEq and PartialOrd for NonZeroInt to Int#70855
Add PartialEq and PartialOrd for NonZeroInt to Int#70855Lucretiel wants to merge 5 commits intorust-lang:masterfrom
Conversation
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
r? @KodrAus |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
These appear to be |
|
@Lucretiel did you run tidy ? |
|
Huh, I thought I ran rustfmt already. Published fixes. |
|
r? @Amanieu |
Amanieu
left a comment
There was a problem hiding this comment.
I'd also like to implement PartialEq for Int, but I wasn't sure what the implications were for implementing traits on primitive types like that.
I think this is fine.
| } | ||
| } | ||
|
|
||
| #[unstable(feature = "nonzero_cmp_to_int", issue = "70855")] |
There was a problem hiding this comment.
Trait implementations are always insta-stable. Use #[stable] instead.
There was a problem hiding this comment.
I updated to stable; it wants a "since" attribute
|
☔ The latest upstream changes (presumably #71556) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Ping from triage: |
|
Ping from Triage: Closing due to inactivity. Please re-open with any updates and conflicts resolved. Thank you for the PR. @Lucretiel |
|
Updated this branch! Conflicts resolved, tidy passing. Not sure how to account for making the trait insta-stable, I'll need some guidance on that. |
|
You'll need to reopen the PR or open a new one. For the stability attribute just mark it as since 1.45.0. We'll need to run this through FCP for stabilization. |
|
I don't have a "reopen" button available to me; maybe @joelpalmer? |
|
Opened #72405 instead |
Propose adding
PartialEqandPartialOrdto theNonZeroInttypes to compare to their inner types. Seems like a pretty obvious change, but I'm obviously open to any feedback or suggestions.I'd also like to implement
PartialEq<NonZeroInt> for Int, but I wasn't sure what the implications were for implementing traits on primitive types like that.