diff --git a/test_suite/tests/test_de.rs b/test_suite/tests/test_de.rs index b4ca2e19..0218cab8 100644 --- a/test_suite/tests/test_de.rs +++ b/test_suite/tests/test_de.rs @@ -14,7 +14,7 @@ extern crate serde_derive; use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}; use std::default::Default; -use std::ffi::{CString, OsString}; +use std::ffi::{CStr, CString, OsString}; use std::net; use std::num::Wrapping; use std::path::{Path, PathBuf}; @@ -22,9 +22,6 @@ use std::rc::{Rc, Weak as RcWeak}; use std::sync::{Arc, Weak as ArcWeak}; use std::time::{Duration, UNIX_EPOCH}; -#[cfg(feature = "unstable")] -use std::ffi::CStr; - extern crate serde; use serde::{Deserialize, Deserializer}; @@ -866,6 +863,26 @@ declare_tests! { Token::U64(1), ], } + test_rc_dst { + Rc::::from("s") => &[ + Token::Str("s"), + ], + Rc::<[bool]>::from(&[true][..]) => &[ + Token::Seq { len: Some(1) }, + Token::Bool(true), + Token::SeqEnd, + ], + } + test_arc_dst { + Arc::::from("s") => &[ + Token::Str("s"), + ], + Arc::<[bool]>::from(&[true][..]) => &[ + Token::Seq { len: Some(1) }, + Token::Bool(true), + Token::SeqEnd, + ], + } } declare_tests! { @@ -961,30 +978,6 @@ declare_tests! { } } -#[cfg(feature = "unstable")] -declare_tests! { - test_rc_dst { - Rc::::from("s") => &[ - Token::Str("s"), - ], - Rc::<[bool]>::from(&[true][..]) => &[ - Token::Seq { len: Some(1) }, - Token::Bool(true), - Token::SeqEnd, - ], - } - test_arc_dst { - Arc::::from("s") => &[ - Token::Str("s"), - ], - Arc::<[bool]>::from(&[true][..]) => &[ - Token::Seq { len: Some(1) }, - Token::Bool(true), - Token::SeqEnd, - ], - } -} - #[cfg(feature = "unstable")] declare_tests! { test_never_result { @@ -1035,7 +1028,6 @@ fn test_osstring() { assert_de_tokens_ignore(&tokens); } -#[cfg(feature = "unstable")] #[test] fn test_cstr() { assert_de_tokens::>( @@ -1044,7 +1036,6 @@ fn test_cstr() { ); } -#[cfg(feature = "unstable")] #[test] fn test_cstr_internal_null() { assert_de_tokens_error::>( @@ -1053,7 +1044,6 @@ fn test_cstr_internal_null() { ); } -#[cfg(feature = "unstable")] #[test] fn test_cstr_internal_null_end() { assert_de_tokens_error::>( diff --git a/test_suite/tests/test_gen.rs b/test_suite/tests/test_gen.rs index ef301b59..82e4dfc0 100644 --- a/test_suite/tests/test_gen.rs +++ b/test_suite/tests/test_gen.rs @@ -297,11 +297,9 @@ fn test_gen() { f: u8, } - #[cfg(feature = "unstable")] #[derive(Serialize, Deserialize)] struct EmptyTuple(); - #[cfg(feature = "unstable")] #[derive(Serialize, Deserialize)] #[serde(deny_unknown_fields)] struct EmptyTupleDenyUnknown(); @@ -327,7 +325,6 @@ fn test_gen() { Variant, } - #[cfg(feature = "unstable")] #[derive(Serialize, Deserialize)] enum EmptyVariants { Braced {}, @@ -339,7 +336,6 @@ fn test_gen() { TupleSkip(#[serde(skip_deserializing)] u8), } - #[cfg(feature = "unstable")] #[derive(Serialize, Deserialize)] #[serde(deny_unknown_fields)] enum EmptyVariantsDenyUnknown { diff --git a/test_suite/tests/test_ser.rs b/test_suite/tests/test_ser.rs index 0d4a35de..cd4ce6bf 100644 --- a/test_suite/tests/test_ser.rs +++ b/test_suite/tests/test_ser.rs @@ -442,6 +442,26 @@ declare_tests! { Token::U64(1), ], } + test_rc_dst { + Rc::::from("s") => &[ + Token::Str("s"), + ], + Rc::<[bool]>::from(&[true][..]) => &[ + Token::Seq { len: Some(1) }, + Token::Bool(true), + Token::SeqEnd, + ], + } + test_arc_dst { + Arc::::from("s") => &[ + Token::Str("s"), + ], + Arc::<[bool]>::from(&[true][..]) => &[ + Token::Seq { len: Some(1) }, + Token::Bool(true), + Token::SeqEnd, + ], + } } declare_tests! { @@ -525,31 +545,6 @@ declare_tests! { } } -// Serde's implementation is not unstable, but the constructors are. -#[cfg(feature = "unstable")] -declare_tests! { - test_rc_dst { - Rc::::from("s") => &[ - Token::Str("s"), - ], - Rc::<[bool]>::from(&[true][..]) => &[ - Token::Seq { len: Some(1) }, - Token::Bool(true), - Token::SeqEnd, - ], - } - test_arc_dst { - Arc::::from("s") => &[ - Token::Str("s"), - ], - Arc::<[bool]>::from(&[true][..]) => &[ - Token::Seq { len: Some(1) }, - Token::Bool(true), - Token::SeqEnd, - ], - } -} - #[cfg(feature = "unstable")] declare_tests! { test_never_result {