about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-08-01 11:07:26 +0000
committerbors <bors@rust-lang.org>2019-08-01 11:07:26 +0000
commitf23a5f208de7fba983bfaaa8d60f1208d5780a98 (patch)
tree7bbe402729300474128162596336986fee874dd8 /src/libcore
parenta17951c4f80eb5208030f91fdb4ae93919fa6b12 (diff)
parentef7ef05e8ee29ccf4c225b1ad1cd3772ace8d660 (diff)
downloadrust-f23a5f208de7fba983bfaaa8d60f1208d5780a98.tar.gz
rust-f23a5f208de7fba983bfaaa8d60f1208d5780a98.zip
Auto merge of #62507 - petrochenkov:macunstab, r=alexcrichton
Remove derives `Encodable`/`Decodable` and unstabilize attribute `#[bench]`

`Encodable` and `Decodable` were deprecated before 1.0 and emitted an unsuppressable warning all this time.
`#[bench]` is a part of the custom test framework feature and cannot be used meaningfully on stable, only as `cfg(false)`.

Crater results can be found in https://github.com/rust-lang/rust/pull/62507#issuecomment-513850732 and below.

This PR also reroutes the tracking issue for `feature(test)` from #27812 (compiler internals) to #50297 (custom test frameworks).

Closes https://github.com/rust-lang/rust/issues/62048
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/hint.rs2
-rw-r--r--src/libcore/macros.rs27
-rw-r--r--src/libcore/prelude/v1.rs2
3 files changed, 3 insertions, 28 deletions
diff --git a/src/libcore/hint.rs b/src/libcore/hint.rs
index 519212bb6cb..3b2b28217f9 100644
--- a/src/libcore/hint.rs
+++ b/src/libcore/hint.rs
@@ -110,7 +110,7 @@ pub fn spin_loop() {
 ///
 /// This function is a no-op, and does not even read from `dummy`.
 #[inline]
-#[unstable(feature = "test", issue = "27812")]
+#[unstable(feature = "test", issue = "50297")]
 #[allow(unreachable_code)] // this makes #[cfg] a bit easier below.
 pub fn black_box<T>(dummy: T) -> T {
     // We need to "use" the argument in some way LLVM can't introspect, and on
diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs
index 218c164a7dc..db0a6eff836 100644
--- a/src/libcore/macros.rs
+++ b/src/libcore/macros.rs
@@ -1267,7 +1267,8 @@ pub(crate) mod builtin {
     pub macro test($item:item) { /* compiler built-in */ }
 
     /// Attribute macro applied to a function to turn it into a benchmark test.
-    #[stable(feature = "rust1", since = "1.0.0")]
+    #[unstable(feature = "test", issue = "50297",
+               reason = "`bench` is a part of custom test frameworks which are unstable")]
     #[allow_internal_unstable(test, rustc_attrs)]
     #[rustc_builtin_macro]
     #[rustc_macro_transparency = "semitransparent"]
@@ -1309,18 +1310,6 @@ pub(crate) mod builtin {
     #[allow_internal_unstable(core_intrinsics)]
     pub macro Debug($item:item) { /* compiler built-in */ }
 
-    /// Unstable implementation detail of the `rustc` compiler, do not use.
-    #[rustc_builtin_macro]
-    #[rustc_macro_transparency = "semitransparent"]
-    #[stable(feature = "rust1", since = "1.0.0")]
-    #[rustc_deprecated(
-        since = "1.0.0",
-        reason = "derive(Decodable) is deprecated in favor of derive(RustcDecodable)",
-        suggestion = "RustcDecodable",
-    )]
-    #[allow_internal_unstable(core_intrinsics, libstd_sys_internals)]
-    pub macro Decodable($item:item) { /* compiler built-in */ }
-
     /// Derive macro generating an impl of the trait `Default`.
     #[rustc_builtin_macro]
     #[rustc_macro_transparency = "semitransparent"]
@@ -1328,18 +1317,6 @@ pub(crate) mod builtin {
     #[allow_internal_unstable(core_intrinsics)]
     pub macro Default($item:item) { /* compiler built-in */ }
 
-    /// Unstable implementation detail of the `rustc` compiler, do not use.
-    #[rustc_builtin_macro]
-    #[rustc_macro_transparency = "semitransparent"]
-    #[stable(feature = "rust1", since = "1.0.0")]
-    #[rustc_deprecated(
-        since = "1.0.0",
-        reason = "derive(Encodable) is deprecated in favor of derive(RustcEncodable)",
-        suggestion = "RustcEncodable",
-    )]
-    #[allow_internal_unstable(core_intrinsics)]
-    pub macro Encodable($item:item) { /* compiler built-in */ }
-
     /// Derive macro generating an impl of the trait `Eq`.
     #[rustc_builtin_macro]
     #[rustc_macro_transparency = "semitransparent"]
diff --git a/src/libcore/prelude/v1.rs b/src/libcore/prelude/v1.rs
index de79e2fa260..c503d8c7019 100644
--- a/src/libcore/prelude/v1.rs
+++ b/src/libcore/prelude/v1.rs
@@ -54,9 +54,7 @@ pub use crate::macros::builtin::{
     Clone,
     Copy,
     Debug,
-    Decodable,
     Default,
-    Encodable,
     Eq,
     Hash,
     Ord,