diff --git a/serde/src/de/impls.rs b/serde/src/de/impls.rs index 59f667ed7..268fa0456 100644 --- a/serde/src/de/impls.rs +++ b/serde/src/de/impls.rs @@ -2005,24 +2005,6 @@ where //////////////////////////////////////////////////////////////////////////////// -#[cfg(feature = "unstable")] -#[allow(deprecated)] -impl<'de, T> Deserialize<'de> for NonZero -where - T: Deserialize<'de> + Zeroable, -{ - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - let value = try!(Deserialize::deserialize(deserializer)); - match NonZero::new(value) { - Some(nonzero) => Ok(nonzero), - None => Err(Error::custom("expected a non-zero value")), - } - } -} - macro_rules! nonzero_integers { ( $( $T: ty, )+ ) => { $( diff --git a/serde/src/de/mod.rs b/serde/src/de/mod.rs index fbc24016e..03175828d 100644 --- a/serde/src/de/mod.rs +++ b/serde/src/de/mod.rs @@ -98,7 +98,6 @@ //! - Path //! - PathBuf //! - Range\ -//! - NonZero\ (unstable, deprecated) //! - num::NonZero* (unstable) //! - **Net types**: //! - IpAddr diff --git a/serde/src/lib.rs b/serde/src/lib.rs index 27f4fb4b6..94266c122 100644 --- a/serde/src/lib.rs +++ b/serde/src/lib.rs @@ -86,7 +86,7 @@ // discussion of these features please refer to this issue: // // https://github.com/serde-rs/serde/issues/812 -#![cfg_attr(feature = "unstable", feature(nonzero, specialization))] +#![cfg_attr(feature = "unstable", feature(specialization))] #![cfg_attr(feature = "alloc", feature(alloc))] #![cfg_attr(feature = "cargo-clippy", deny(clippy, clippy_pedantic))] // Whitelisted clippy lints @@ -213,10 +213,6 @@ mod lib { #[cfg(feature = "std")] pub use std::time::{Duration, SystemTime, UNIX_EPOCH}; - #[cfg(feature = "unstable")] - #[allow(deprecated)] - pub use core::nonzero::{NonZero, Zeroable}; - #[cfg(feature = "unstable")] pub use core::num::{NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU8, NonZeroUsize}; } diff --git a/serde/src/ser/impls.rs b/serde/src/ser/impls.rs index fbe057cdd..572806bf1 100644 --- a/serde/src/ser/impls.rs +++ b/serde/src/ser/impls.rs @@ -408,20 +408,6 @@ where //////////////////////////////////////////////////////////////////////////////// -#[cfg(feature = "unstable")] -#[allow(deprecated)] -impl Serialize for NonZero -where - T: Serialize + Zeroable + Clone, -{ - fn serialize(&self, serializer: S) -> Result - where - S: Serializer, - { - self.clone().get().serialize(serializer) - } -} - macro_rules! nonzero_integers { ( $( $T: ident, )+ ) => { $( diff --git a/serde/src/ser/mod.rs b/serde/src/ser/mod.rs index c8bdb6075..7d82a4c95 100644 --- a/serde/src/ser/mod.rs +++ b/serde/src/ser/mod.rs @@ -93,7 +93,6 @@ //! - Path //! - PathBuf //! - Range\ -//! - NonZero\ (unstable, deprecated) //! - num::NonZero* (unstable) //! - **Net types**: //! - IpAddr