Skip to content

Commit

Permalink
num::NonZero* types now have their own tracking issue: rust-lang#49137
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin committed Mar 18, 2018
1 parent 73c0537 commit a23f685
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
7 changes: 1 addition & 6 deletions src/libcore/nonzero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
// except according to those terms.

//! Exposes the NonZero lang item which provides optimization hints.
#![unstable(feature = "nonzero",
reason = "deprecated",
issue = "27730")]
#![unstable(feature = "nonzero", reason = "deprecated", issue = "49137")]
#![rustc_deprecated(reason = "use `std::ptr::NonNull` or `std::num::NonZero*` instead",
since = "1.26.0")]
#![allow(deprecated)]
Expand Down Expand Up @@ -70,9 +68,6 @@ pub struct NonZero<T: Zeroable>(pub(crate) T);
impl<T: Zeroable> NonZero<T> {
/// Creates an instance of NonZero with the provided value.
/// You must indeed ensure that the value is actually "non-zero".
#[unstable(feature = "nonzero",
reason = "needs an RFC to flesh out the design",
issue = "27730")]
#[inline]
pub const unsafe fn new_unchecked(inner: T) -> Self {
NonZero(inner)
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ macro_rules! nonzero_integers {
}

nonzero_integers! {
#[unstable(feature = "nonzero", issue = "27730")]
#[unstable(feature = "nonzero", issue = "49137")]
NonZeroU8(u8); NonZeroI8(i8);
NonZeroU16(u16); NonZeroI16(i16);
NonZeroU32(u32); NonZeroI32(i32);
Expand All @@ -103,7 +103,7 @@ nonzero_integers! {
nonzero_integers! {
// Change this to `#[unstable(feature = "i128", issue = "35118")]`
// if other NonZero* integer types are stabilizied before 128-bit integers
#[unstable(feature = "nonzero", issue = "27730")]
#[unstable(feature = "nonzero", issue = "49137")]
NonZeroU128(u128); NonZeroI128(i128);
}

Expand Down
4 changes: 2 additions & 2 deletions src/libstd/num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ pub use core::num::{FpCategory, ParseIntError, ParseFloatError, TryFromIntError}
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::num::Wrapping;

#[unstable(feature = "nonzero", issue = "27730")]
#[unstable(feature = "nonzero", issue = "49137")]
pub use core::num::{
NonZeroU8, NonZeroI8, NonZeroU16, NonZeroI16, NonZeroU32, NonZeroI32,
NonZeroU64, NonZeroI64, NonZeroUsize, NonZeroIsize,
};

// Change this to `#[unstable(feature = "i128", issue = "35118")]`
// if other NonZero* integer types are stabilizied before 128-bit integers
#[unstable(feature = "nonzero", issue = "27730")]
#[unstable(feature = "nonzero", issue = "49137")]
pub use core::num::{NonZeroU128, NonZeroI128};

#[cfg(test)] use fmt;
Expand Down

0 comments on commit a23f685

Please sign in to comment.