Skip to content

Commit c536639

Browse files
committed
Remove unstable deprecated num::NonZeroI* types
1 parent ee85bfd commit c536639

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

src/libcore/num/mod.rs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ macro_rules! impl_nonzero_fmt {
2424
( #[$stability: meta] ( $( $Trait: ident ),+ ) for $Ty: ident ) => {
2525
$(
2626
#[$stability]
27-
#[allow(deprecated)]
2827
impl fmt::$Trait for $Ty {
2928
#[inline]
3029
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -36,7 +35,7 @@ macro_rules! impl_nonzero_fmt {
3635
}
3736

3837
macro_rules! nonzero_integers {
39-
( #[$stability: meta] #[$deprecation: meta] $( $Ty: ident($Int: ty); )+ ) => {
38+
( #[$stability: meta] $( $Ty: ident($Int: ty); )+ ) => {
4039
$(
4140
/// An integer that is known not to equal zero.
4241
///
@@ -48,7 +47,6 @@ macro_rules! nonzero_integers {
4847
/// assert_eq!(size_of::<Option<std::num::NonZeroU32>>(), size_of::<u32>());
4948
/// ```
5049
#[$stability]
51-
#[$deprecation]
5250
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5351
pub struct $Ty(NonZero<$Int>);
5452

@@ -94,7 +92,6 @@ macro_rules! nonzero_integers {
9492

9593
nonzero_integers! {
9694
#[unstable(feature = "nonzero", issue = "49137")]
97-
#[allow(deprecated)] // Redundant, works around "error: inconsistent lockstep iteration"
9895
NonZeroU8(u8);
9996
NonZeroU16(u16);
10097
NonZeroU32(u32);
@@ -103,19 +100,6 @@ nonzero_integers! {
103100
NonZeroUsize(usize);
104101
}
105102

106-
nonzero_integers! {
107-
#[unstable(feature = "nonzero", issue = "49137")]
108-
#[rustc_deprecated(since = "1.26.0", reason = "\
109-
signed non-zero integers are considered for removal due to lack of known use cases. \
110-
If you’re using them, please comment on https://github.com/rust-lang/rust/issues/49137")]
111-
NonZeroI8(i8);
112-
NonZeroI16(i16);
113-
NonZeroI32(i32);
114-
NonZeroI64(i64);
115-
NonZeroI128(i128);
116-
NonZeroIsize(isize);
117-
}
118-
119103
/// Provides intentionally-wrapped arithmetic on `T`.
120104
///
121105
/// Operations like `+` on `u32` values is intended to never overflow,

src/libstd/num.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ pub use core::num::Wrapping;
2323

2424
#[unstable(feature = "nonzero", issue = "49137")]
2525
#[allow(deprecated)]
26-
pub use core::num::{
27-
NonZeroU8, NonZeroI8, NonZeroU16, NonZeroI16, NonZeroU32, NonZeroI32,
28-
NonZeroU64, NonZeroI64, NonZeroU128, NonZeroI128, NonZeroUsize, NonZeroIsize,
29-
};
26+
pub use core::num::{NonZeroU8, NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU128, NonZeroUsize};
3027

3128
#[cfg(test)] use fmt;
3229
#[cfg(test)] use ops::{Add, Sub, Mul, Div, Rem};

0 commit comments

Comments
 (0)