Skip to content

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

Merged
alexcrichton merged 8 commits into
rust-lang:masterfrom
SimonSapin:nonzero
Mar 23, 2018
Merged

Add 12 num::NonZero* types for primitive integers, deprecate core::nonzero#48265
alexcrichton merged 8 commits into
rust-lang:masterfrom
SimonSapin:nonzero

Conversation

@SimonSapin

@SimonSapinSimonSapin commented Feb 16, 2018

Copy link
Copy Markdown
Contributor

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

@rust-highfive

Copy link
Copy Markdown
Contributor

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-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 16, 2018
@SimonSapin
SimonSapinforce-pushed the nonzero branch 2 times, most recently from bb36499 to fc8d2e6CompareFebruary 16, 2018 11:32
@aidanhs

Copy link
Copy Markdown
Contributor

r? @KodrAus

@rust-highfiverust-highfive assigned KodrAus and unassigned aidanhsFeb 16, 2018
@SimonSapin
SimonSapinforce-pushed the nonzero branch 3 times, most recently from c819a2e to 593b332CompareFebruary 16, 2018 15:36
@kennytmkennytm added the T-libs-api [DEPRECATED; DO NOT USE] label Feb 16, 2018
@kennytmkennytm added S-blocked Status: 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
Copy Markdown
Member

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

@bors

bors commented Feb 25, 2018

Copy link
Copy Markdown
Collaborator

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

@emilyalbiniemilyalbini added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Feb 26, 2018
@SimonSapin
SimonSapinforce-pushed the nonzero branch 3 times, most recently from fe39656 to a7ca6b2CompareMarch 9, 2018 08:42

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Filed #49123

@bors

bors commented Mar 15, 2018

Copy link
Copy Markdown
Collaborator

☔ 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);

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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 👍

@KodrAusKodrAus left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

@bors r+

@bors

bors commented Mar 20, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit a23f685 has been approved by KodrAus

@borsbors 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

bors commented Mar 21, 2018

Copy link
Copy Markdown
Collaborator

⌛ Testing commit a23f685 with merge d16d565cf25d417110f72a4d3181fe111312fa82...

@bors

bors commented Mar 21, 2018

Copy link
Copy Markdown
Collaborator

💔 Test failed - status-travis

@borsbors 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
Copy Markdown
Member

@bors: retry

  • network error?

@borsbors 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#27730rust-lang#49137Fixesrust-lang#27730
@frewsxcvfrewsxcv mentioned this pull request Mar 23, 2018
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#27730rust-lang#49137Fixesrust-lang#27730
bors added a commit that referenced this pull request Mar 23, 2018
@alexcrichton
alexcrichton merged commit a23f685 into rust-lang:masterMar 23, 2018
@SimonSapin
SimonSapin deleted the nonzero branch March 30, 2018 13:52
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-libs-api[DEPRECATED; DO NOT USE]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@SimonSapin@rust-highfive@aidanhs@kennytm@bors@KodrAus@alexcrichton@Centril@emilyalbini