Add 12 num::NonZero* types for primitive integers, deprecate core::nonzero#48265
Add 12 num::NonZero* types for primitive integers, deprecate core::nonzero#48265alexcrichton merged 8 commits intorust-lang:masterfrom
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aidanhs (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. |
bb36499 to
fc8d2e6
Compare
|
r? @KodrAus |
c819a2e to
593b332
Compare
|
Marking as blocked by rust-lang/rfcs#2307, the RFC has not been accepted yet. |
|
☔ The latest upstream changes (presumably #48520) made this pull request unmergeable. Please resolve the merge conflicts. |
fe39656 to
a7ca6b2
Compare
There was a problem hiding this comment.
The ptr::Shared removal makes this test fail unless I make this change. I have no idea why.
|
☔ The latest upstream changes (presumably #47630) made this pull request unmergeable. Please resolve the merge conflicts. |
| #[lang = "non_zero"] | ||
| #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Hash)] | ||
| pub struct NonZero<T: Zeroable>(T); | ||
| pub struct NonZero<T: Zeroable>(pub(crate) T); |
There was a problem hiding this comment.
Is there a reason we need to make this pub(crate) instead of using the new_unchecked and get methods?
There was a problem hiding this comment.
This is in anticipation for later making this module private and reducing it to its bare minimum (the lang item) SimonSapin#1
There was a problem hiding this comment.
There was a problem hiding this comment.
Ah gotcha. I missed that part in the RFC 👍
KodrAus
left a comment
There was a problem hiding this comment.
This looks good to me! Thanks @SimonSapin
|
@bors r+ |
|
📌 Commit a23f685 has been approved by |
|
⌛ Testing commit a23f685 with merge d16d565cf25d417110f72a4d3181fe111312fa82... |
|
💔 Test failed - status-travis |
|
@bors: retry
|
Add 12 num::NonZero* types for primitive integers, deprecate core::nonzero RFC: rust-lang/rfcs#2307 Tracking issue: ~~rust-lang#27730 rust-lang#49137 Fixes rust-lang#27730
Add 12 num::NonZero* types for primitive integers, deprecate core::nonzero RFC: rust-lang/rfcs#2307 Tracking issue: ~~rust-lang#27730 rust-lang#49137 Fixes rust-lang#27730
RFC: rust-lang/rfcs#2307
Tracking issue:
#27730#49137Fixes #27730