Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 12 num::NonZero* types for primitive integers, deprecate core::nonzero #48265

Merged
merged 8 commits into from
Mar 23, 2018

Conversation

SimonSapin
Copy link
Contributor

@SimonSapin SimonSapin commented Feb 16, 2018

RFC: rust-lang/rfcs#2307
Tracking issue: #27730 #49137
Fixes #27730

@rust-highfive
Copy link
Collaborator

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.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 16, 2018
@aidanhs
Copy link
Member

aidanhs commented Feb 16, 2018

r? @KodrAus

@rust-highfive rust-highfive assigned KodrAus and unassigned aidanhs Feb 16, 2018
@kennytm kennytm added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Feb 16, 2018
@kennytm kennytm added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 16, 2018
@kennytm
Copy link
Member

kennytm commented Feb 16, 2018

Marking as blocked by rust-lang/rfcs#2307, the RFC has not been accepted yet.

@bors
Copy link
Contributor

bors commented Feb 25, 2018

☔ The latest upstream changes (presumably #48520) made this pull request unmergeable. Please resolve the merge conflicts.

@pietroalbini pietroalbini added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Feb 26, 2018
@SimonSapin SimonSapin force-pushed the nonzero branch 3 times, most recently from fe39656 to a7ca6b2 Compare March 9, 2018 08:42
@@ -20,7 +20,7 @@ where

// @has no_redundancy/struct.Outer.html
// @has - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]/*/code' "impl<T> Send for \
// Outer<T> where T: Copy + Send"
// Outer<T> where T: Send + Copy"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ptr::Shared removal makes this test fail unless I make this change. I have no idea why.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed #49123

@bors
Copy link
Contributor

bors commented Mar 15, 2018

☔ The latest upstream changes (presumably #47630) made this pull request unmergeable. Please resolve the merge conflicts.

@@ -62,14 +63,11 @@ impl_zeroable_for_integer_types! {
/// NULL or 0 that might allow certain optimizations.
#[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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we need to make this pub(crate) instead of using the new_unchecked and get methods?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in anticipation for later making this module private and reducing it to its bare minimum (the lang item) SimonSapin#1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah gotcha. I missed that part in the RFC 👍

Copy link
Contributor

@KodrAus KodrAus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! Thanks @SimonSapin

@KodrAus
Copy link
Contributor

KodrAus commented Mar 20, 2018

@bors r+

@bors
Copy link
Contributor

bors commented Mar 20, 2018

📌 Commit a23f685 has been approved by KodrAus

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 20, 2018
@bors
Copy link
Contributor

bors commented Mar 21, 2018

⌛ Testing commit a23f685 with merge d16d565cf25d417110f72a4d3181fe111312fa82...

@bors
Copy link
Contributor

bors commented Mar 21, 2018

💔 Test failed - status-travis

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 21, 2018
@alexcrichton
Copy link
Member

@bors: retry

  • network error?

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 21, 2018
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 23, 2018
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
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Mar 23, 2018
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
bors added a commit that referenced this pull request Mar 23, 2018
@alexcrichton alexcrichton merged commit a23f685 into rust-lang:master Mar 23, 2018
@SimonSapin SimonSapin deleted the nonzero branch March 30, 2018 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants