From 924e522d16488f95eaa9a8eae7e0460781d87b85 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Mon, 15 Mar 2021 19:44:40 +0100 Subject: [PATCH] Deprecate RustcEncodable and RustcDecodable. --- library/core/src/macros/mod.rs | 8 ++++++++ library/core/src/prelude/v1.rs | 2 +- library/std/src/prelude/v1.rs | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/library/core/src/macros/mod.rs b/library/core/src/macros/mod.rs index 28fed9b8a14..99894b5605e 100644 --- a/library/core/src/macros/mod.rs +++ b/library/core/src/macros/mod.rs @@ -1468,6 +1468,10 @@ pub(crate) mod builtin { #[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" + )] pub macro RustcDecodable($item:item) { /* compiler built-in */ } @@ -1476,6 +1480,10 @@ pub(crate) mod builtin { #[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" + )] 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 c7cb2a69ff7..7d33ca8bb69 100644 --- a/library/core/src/prelude/v1.rs +++ b/library/core/src/prelude/v1.rs @@ -61,7 +61,7 @@ pub use crate::{ }; #[stable(feature = "builtin_macro_prelude", since = "1.38.0")] -#[allow(deprecated)] +#[allow(deprecated, deprecated_in_future)] #[doc(no_inline)] pub use crate::macros::builtin::{ bench, global_allocator, test, test_case, RustcDecodable, RustcEncodable, diff --git a/library/std/src/prelude/v1.rs b/library/std/src/prelude/v1.rs index ec89bb6d2a4..c5b871edbf2 100644 --- a/library/std/src/prelude/v1.rs +++ b/library/std/src/prelude/v1.rs @@ -48,7 +48,7 @@ pub use core::prelude::v1::{ // FIXME: Attribute and internal derive macros are not documented because for them rustdoc generates // dead links which fail link checker testing. #[stable(feature = "builtin_macro_prelude", since = "1.38.0")] -#[allow(deprecated)] +#[allow(deprecated, deprecated_in_future)] #[doc(hidden)] pub use core::prelude::v1::{ bench, global_allocator, test, test_case, RustcDecodable, RustcEncodable,