1
Fork 0

Rollup merge of #83160 - m-ou-se:deprecate-rustc-serialize-derives, r=petrochenkov

Deprecate RustcEncodable and RustcDecodable.

We can't remove the `RustcEncodable` and `RustcDecodable` derive macros from the prelude, but we can deprecate them.
This commit is contained in:
Yuki Okushi 2021-03-16 23:54:00 +09:00 committed by GitHub
commit 39af66f651
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

View file

@ -1468,6 +1468,10 @@ pub(crate) mod builtin {
#[rustc_builtin_macro] #[rustc_builtin_macro]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[allow_internal_unstable(core_intrinsics, libstd_sys_internals)] #[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) { pub macro RustcDecodable($item:item) {
/* compiler built-in */ /* compiler built-in */
} }
@ -1476,6 +1480,10 @@ pub(crate) mod builtin {
#[rustc_builtin_macro] #[rustc_builtin_macro]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[allow_internal_unstable(core_intrinsics)] #[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) { pub macro RustcEncodable($item:item) {
/* compiler built-in */ /* compiler built-in */
} }

View file

@ -61,7 +61,7 @@ pub use crate::{
}; };
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")] #[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow(deprecated)] #[allow(deprecated, deprecated_in_future)]
#[doc(no_inline)] #[doc(no_inline)]
pub use crate::macros::builtin::{ pub use crate::macros::builtin::{
bench, global_allocator, test, test_case, RustcDecodable, RustcEncodable, bench, global_allocator, test, test_case, RustcDecodable, RustcEncodable,

View file

@ -48,7 +48,7 @@ pub use core::prelude::v1::{
// FIXME: Attribute and internal derive macros are not documented because for them rustdoc generates // FIXME: Attribute and internal derive macros are not documented because for them rustdoc generates
// dead links which fail link checker testing. // dead links which fail link checker testing.
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")] #[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow(deprecated)] #[allow(deprecated, deprecated_in_future)]
#[doc(hidden)] #[doc(hidden)]
pub use core::prelude::v1::{ pub use core::prelude::v1::{
bench, global_allocator, test, test_case, RustcDecodable, RustcEncodable, bench, global_allocator, test, test_case, RustcDecodable, RustcEncodable,