Skip to content

Commit d43ca37

Browse files
committed
Remove unstable deprecated num::NonZeroI* types
1 parent 8adea83 commit d43ca37

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
@@ -23,7 +23,6 @@ macro_rules! impl_nonzero_fmt {
2323
( #[$stability: meta] ( $( $Trait: ident ),+ ) for $Ty: ident ) => {
2424
$(
2525
#[$stability]
26-
#[allow(deprecated)]
2726
impl fmt::$Trait for $Ty {
2827
#[inline]
2928
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -35,7 +34,7 @@ macro_rules! impl_nonzero_fmt {
3534
}
3635

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

@@ -93,7 +91,6 @@ macro_rules! nonzero_integers {
9391

9492
nonzero_integers! {
9593
#[unstable(feature = "nonzero", issue = "49137")]
96-
#[allow(deprecated)] // Redundant, works around "error: inconsistent lockstep iteration"
9794
NonZeroU8(u8);
9895
NonZeroU16(u16);
9996
NonZeroU32(u32);
@@ -102,19 +99,6 @@ nonzero_integers! {
10299
NonZeroUsize(usize);
103100
}
104101

105-
nonzero_integers! {
106-
#[unstable(feature = "nonzero", issue = "49137")]
107-
#[rustc_deprecated(since = "1.26.0", reason = "\
108-
signed non-zero integers are considered for removal due to lack of known use cases. \
109-
If you’re using them, please comment on https://github.com/serde-rs/serde/pull/1191")]
110-
NonZeroI8(i8);
111-
NonZeroI16(i16);
112-
NonZeroI32(i32);
113-
NonZeroI64(i64);
114-
NonZeroI128(i128);
115-
NonZeroIsize(isize);
116-
}
117-
118102
/// Provides intentionally-wrapped arithmetic on `T`.
119103
///
120104
/// 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)