diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index 4bd94e3ce3915..d6aec872aa829 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -151,6 +151,7 @@ #![feature(variant_count)] #![feature(const_array_from_ref)] #![feature(const_slice_from_ref)] +#![feature(rustc_encodable_decodable)] // // Language features: #![feature(abi_unadjusted)] diff --git a/library/core/src/macros/mod.rs b/library/core/src/macros/mod.rs index d8f6c85e428cd..0497187a01501 100644 --- a/library/core/src/macros/mod.rs +++ b/library/core/src/macros/mod.rs @@ -1508,26 +1508,36 @@ pub(crate) mod builtin { /// Unstable implementation detail of the `rustc` compiler, do not use. #[rustc_builtin_macro] - #[stable(feature = "rust1", since = "1.0.0")] #[allow_internal_unstable(core_intrinsics, libstd_sys_internals)] #[rustc_deprecated( since = "1.52.0", reason = "rustc-serialize is deprecated and no longer supported" )] #[doc(hidden)] // While technically stable, using it is unstable, and deprecated. Hide it. + #[unstable( + feature = "rustc_encodable_decodable", + issue = "none", + soft, + reason = "unstable implementation detail of the `rustc` compiler, do not use" + )] pub macro RustcDecodable($item:item) { /* compiler built-in */ } /// Unstable implementation detail of the `rustc` compiler, do not use. #[rustc_builtin_macro] - #[stable(feature = "rust1", since = "1.0.0")] #[allow_internal_unstable(core_intrinsics)] #[rustc_deprecated( since = "1.52.0", reason = "rustc-serialize is deprecated and no longer supported" )] #[doc(hidden)] // While technically stable, using it is unstable, and deprecated. Hide it. + #[unstable( + feature = "rustc_encodable_decodable", + issue = "none", + soft, + reason = "unstable implementation detail of the `rustc` compiler, do not use" + )] pub macro RustcEncodable($item:item) { /* compiler built-in */ } diff --git a/library/core/src/prelude/v1.rs b/library/core/src/prelude/v1.rs index 0fb8846288bee..4ada8d6412414 100644 --- a/library/core/src/prelude/v1.rs +++ b/library/core/src/prelude/v1.rs @@ -70,7 +70,12 @@ pub use crate::{ pub use crate::concat_bytes; // Do not `doc(inline)` these `doc(hidden)` items. -#[stable(feature = "builtin_macro_prelude", since = "1.38.0")] +#[unstable( + feature = "rustc_encodable_decodable", + issue = "none", + soft, + reason = "unstable implementation detail of the `rustc` compiler, do not use" +)] #[allow(deprecated)] pub use crate::macros::builtin::{RustcDecodable, RustcEncodable}; diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index d5f9d20c426e2..26903aa285165 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -321,6 +321,7 @@ #![feature(ptr_internals)] #![feature(rustc_attrs)] #![feature(rustc_private)] +#![feature(rustc_encodable_decodable)] #![feature(saturating_int_impl)] #![feature(slice_concat_ext)] #![feature(slice_internals)] diff --git a/library/std/src/prelude/v1.rs b/library/std/src/prelude/v1.rs index b52bcdfca9e07..fb96ae876cd16 100644 --- a/library/std/src/prelude/v1.rs +++ b/library/std/src/prelude/v1.rs @@ -55,7 +55,12 @@ pub use core::prelude::v1::{ pub use core::prelude::v1::concat_bytes; // Do not `doc(inline)` these `doc(hidden)` items. -#[stable(feature = "builtin_macro_prelude", since = "1.38.0")] +#[unstable( + feature = "rustc_encodable_decodable", + issue = "none", + soft, + reason = "unstable implementation detail of the `rustc` compiler, do not use" +)] #[allow(deprecated)] pub use core::prelude::v1::{RustcDecodable, RustcEncodable}; diff --git a/src/test/run-make-fulldeps/pretty-expanded/input.rs b/src/test/run-make-fulldeps/pretty-expanded/input.rs index af3d75b3bf216..90ddfdca46f3b 100644 --- a/src/test/run-make-fulldeps/pretty-expanded/input.rs +++ b/src/test/run-make-fulldeps/pretty-expanded/input.rs @@ -1,6 +1,6 @@ -#[crate_type="lib"] - -// #13544 +// FIXME: This should be replaced with some other derive macro +#![feature(rustc_encodable_decodable)] +#[crate_type="lib"] // Why is this an outer attribute? extern crate rustc_serialize;