Skip to content

Commit 39af66f

Browse files
authored
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.
2 parents 896b44a + 924e522 commit 39af66f

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

library/core/src/macros/mod.rs

+8
Original file line numberDiff line numberDiff line change
@@ -1468,6 +1468,10 @@ pub(crate) mod builtin {
14681468
#[rustc_builtin_macro]
14691469
#[stable(feature = "rust1", since = "1.0.0")]
14701470
#[allow_internal_unstable(core_intrinsics, libstd_sys_internals)]
1471+
#[rustc_deprecated(
1472+
since = "1.52.0",
1473+
reason = "rustc-serialize is deprecated and no longer supported"
1474+
)]
14711475
pub macro RustcDecodable($item:item) {
14721476
/* compiler built-in */
14731477
}
@@ -1476,6 +1480,10 @@ pub(crate) mod builtin {
14761480
#[rustc_builtin_macro]
14771481
#[stable(feature = "rust1", since = "1.0.0")]
14781482
#[allow_internal_unstable(core_intrinsics)]
1483+
#[rustc_deprecated(
1484+
since = "1.52.0",
1485+
reason = "rustc-serialize is deprecated and no longer supported"
1486+
)]
14791487
pub macro RustcEncodable($item:item) {
14801488
/* compiler built-in */
14811489
}

library/core/src/prelude/v1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub use crate::{
6161
};
6262

6363
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
64-
#[allow(deprecated)]
64+
#[allow(deprecated, deprecated_in_future)]
6565
#[doc(no_inline)]
6666
pub use crate::macros::builtin::{
6767
bench, global_allocator, test, test_case, RustcDecodable, RustcEncodable,

library/std/src/prelude/v1.rs

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

0 commit comments

Comments
 (0)