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

Projects
None yet
9 participants
@SimonSapin
Copy link
Contributor

SimonSapin commented Feb 16, 2018

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

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Feb 16, 2018

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.

@aidanhs

This comment has been minimized.

Copy link
Member

aidanhs commented Feb 16, 2018

@rust-highfive rust-highfive assigned KodrAus and unassigned aidanhs Feb 16, 2018

@SimonSapin SimonSapin force-pushed the SimonSapin:nonzero branch 3 times, most recently from c819a2e to 593b332 Feb 16, 2018

@kennytm kennytm added the T-libs label Feb 16, 2018

@kennytm

This comment has been minimized.

Copy link
Member

kennytm commented Feb 16, 2018

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

@SimonSapin SimonSapin force-pushed the SimonSapin:nonzero branch from cabc4f1 to 90a7a4b Feb 16, 2018

@bors

This comment has been minimized.

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 and removed S-blocked labels Feb 26, 2018

@SimonSapin SimonSapin force-pushed the SimonSapin:nonzero branch 3 times, most recently from fe39656 to a7ca6b2 Mar 8, 2018

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

This comment has been minimized.

@SimonSapin

SimonSapin Mar 9, 2018

Author Contributor

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

This comment has been minimized.

@SimonSapin

SimonSapin Mar 17, 2018

Author Contributor

Filed #49123

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Mar 15, 2018

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

@KodrAus

This comment has been minimized.

Copy link

KodrAus commented Mar 18, 2018

I was just waiting for the FCP to finish :) Will take a look through shortly.

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

This comment has been minimized.

@KodrAus

KodrAus Mar 18, 2018

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

This comment has been minimized.

@SimonSapin

SimonSapin Mar 18, 2018

Author Contributor

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

This comment has been minimized.

@KodrAus

KodrAus Mar 20, 2018

Ah gotcha. I missed that part in the RFC 👍

@KodrAus
Copy link

KodrAus left a comment

This looks good to me! Thanks @SimonSapin

@KodrAus

This comment has been minimized.

Copy link

KodrAus commented Mar 20, 2018

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Mar 20, 2018

📌 Commit a23f685 has been approved by KodrAus

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Mar 21, 2018

⌛️ Testing commit a23f685 with merge d16d565...

bors added a commit that referenced this pull request Mar 21, 2018

Auto merge of #48265 - SimonSapin:nonzero, r=KodrAus
Add 12 num::NonZero* types for primitive integers, deprecate core::nonzero

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

This comment has been minimized.

Copy link
Contributor

bors commented Mar 21, 2018

💔 Test failed - status-travis

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Mar 21, 2018

@bors: retry

  • network error?

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 23, 2018

Rollup merge of rust-lang#48265 - SimonSapin:nonzero, r=KodrAus
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

Auto merge of #49306 - frewsxcv:rollup, r=frewsxcv
Rollup of 13 pull requests

- Successful merges: #48265, #48575, #49028, #49035, #49046, #49064, #49102, #49160, #49162, #49169, #49235, #49262, #49272
- Failed merges:

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Mar 23, 2018

Rollup merge of rust-lang#48265 - SimonSapin:nonzero, r=KodrAus
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

bors added a commit that referenced this pull request Mar 23, 2018

bors added a commit that referenced this pull request Mar 23, 2018

bors added a commit that referenced this pull request Mar 23, 2018

bors added a commit that referenced this pull request Mar 23, 2018

bors added a commit that referenced this pull request Mar 23, 2018

bors added a commit that referenced this pull request Mar 23, 2018

@alexcrichton alexcrichton merged commit a23f685 into rust-lang:master Mar 23, 2018

1 of 2 checks passed

homu Test failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@SimonSapin SimonSapin deleted the SimonSapin:nonzero branch Mar 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.