about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJane Lusby <jlusby@yaah.dev>2022-06-13 15:05:19 -0700
committerJane Losare-Lusby <jlusby@yaah.dev>2022-07-08 21:18:15 +0000
commit0715616b51dd7d3254c1259420aa1461716cc56b (patch)
tree9124ad38fc2222eb20bc7ff33891d4652cf3f4b4
parentb55453dbad4fb032d5b00c218146e1b053774a08 (diff)
downloadrust-0715616b51dd7d3254c1259420aa1461716cc56b.tar.gz
rust-0715616b51dd7d3254c1259420aa1461716cc56b.zip
add rt flag to allowed internal unstable for RustcEncodable/Decodable
-rw-r--r--library/core/src/macros/mod.rs4
-rw-r--r--src/test/ui/stability-attribute/rustc-encodable-stability.rs8
2 files changed, 10 insertions, 2 deletions
diff --git a/library/core/src/macros/mod.rs b/library/core/src/macros/mod.rs
index 673a39c298f..bd62bc5c305 100644
--- a/library/core/src/macros/mod.rs
+++ b/library/core/src/macros/mod.rs
@@ -1537,7 +1537,7 @@ 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)]
+    #[allow_internal_unstable(core_intrinsics, libstd_sys_internals, rt)]
     #[deprecated(since = "1.52.0", note = "rustc-serialize is deprecated and no longer supported")]
     #[doc(hidden)] // While technically stable, using it is unstable, and deprecated. Hide it.
     pub macro RustcDecodable($item:item) {
@@ -1547,7 +1547,7 @@ 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)]
+    #[allow_internal_unstable(core_intrinsics, rt)]
     #[deprecated(since = "1.52.0", note = "rustc-serialize is deprecated and no longer supported")]
     #[doc(hidden)] // While technically stable, using it is unstable, and deprecated. Hide it.
     pub macro RustcEncodable($item:item) {
diff --git a/src/test/ui/stability-attribute/rustc-encodable-stability.rs b/src/test/ui/stability-attribute/rustc-encodable-stability.rs
new file mode 100644
index 00000000000..18eff27d9a5
--- /dev/null
+++ b/src/test/ui/stability-attribute/rustc-encodable-stability.rs
@@ -0,0 +1,8 @@
+// edition:2018
+#![allow(deprecated)]
+extern crate rustc_serialize;
+
+#[derive(RustcDecodable, RustcEncodable)]
+struct ArbitraryTestType(());
+
+fn main() {}