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]
#[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 */
}

View File

@ -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,

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
// 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,