diff options
| author | Ralf Jung <post@ralfj.de> | 2024-12-13 18:23:32 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2025-01-14 16:16:38 +0100 |
| commit | 4df78a07e5c3ad032d59941b77ab394e4a75c7c1 (patch) | |
| tree | 5408dd6b9bb51d7ddd174b6f4def46d513e4058e | |
| parent | c074d8eee765cfd64e6e143d2894c85c7f3ddc1d (diff) | |
| download | rust-4df78a07e5c3ad032d59941b77ab394e4a75c7c1.tar.gz rust-4df78a07e5c3ad032d59941b77ab394e4a75c7c1.zip | |
make rustc_encodable_decodable feature properly unstable
| -rw-r--r-- | library/core/src/macros/mod.rs | 6 | ||||
| -rw-r--r-- | library/core/src/prelude/mod.rs | 3 | ||||
| -rw-r--r-- | library/std/src/prelude/mod.rs | 3 | ||||
| -rw-r--r-- | tests/ui/derives/rustc-decodable-issue-123156.rs | 11 | ||||
| -rw-r--r-- | tests/ui/derives/rustc-decodable-issue-123156.stderr | 10 | ||||
| -rw-r--r-- | tests/ui/feature-gates/feature-gate-rustc_encodable_decodable.rs | 16 | ||||
| -rw-r--r-- | tests/ui/feature-gates/feature-gate-rustc_encodable_decodable.stderr | 66 |
7 files changed, 4 insertions, 111 deletions
diff --git a/library/core/src/macros/mod.rs b/library/core/src/macros/mod.rs index 402b436d28e..ed79ceeb6db 100644 --- a/library/core/src/macros/mod.rs +++ b/library/core/src/macros/mod.rs @@ -1773,8 +1773,7 @@ pub(crate) mod builtin { #[rustc_builtin_macro] #[unstable( feature = "rustc_encodable_decodable", - issue = "none", - soft, + issue = "134301", reason = "derive macro for `rustc-serialize`; should not be used in new code" )] #[deprecated(since = "1.52.0", note = "rustc-serialize is deprecated and no longer supported")] @@ -1787,8 +1786,7 @@ pub(crate) mod builtin { #[rustc_builtin_macro] #[unstable( feature = "rustc_encodable_decodable", - issue = "none", - soft, + issue = "134301", reason = "derive macro for `rustc-serialize`; should not be used in new code" )] #[deprecated(since = "1.52.0", note = "rustc-serialize is deprecated and no longer supported")] diff --git a/library/core/src/prelude/mod.rs b/library/core/src/prelude/mod.rs index d3fda1cd273..98f061d463a 100644 --- a/library/core/src/prelude/mod.rs +++ b/library/core/src/prelude/mod.rs @@ -22,8 +22,7 @@ pub mod v1 { // Do not `doc(inline)` these `doc(hidden)` items. #[unstable( feature = "rustc_encodable_decodable", - issue = "none", - soft, + issue = "134301", reason = "derive macro for `rustc-serialize`; should not be used in new code" )] #[allow(deprecated)] diff --git a/library/std/src/prelude/mod.rs b/library/std/src/prelude/mod.rs index 4ec328208f0..b7efffcc446 100644 --- a/library/std/src/prelude/mod.rs +++ b/library/std/src/prelude/mod.rs @@ -124,8 +124,7 @@ pub mod v1 { // Do not `doc(inline)` these `doc(hidden)` items. #[unstable( feature = "rustc_encodable_decodable", - issue = "none", - soft, + issue = "134301", reason = "derive macro for `rustc-serialize`; should not be used in new code" )] #[allow(deprecated)] diff --git a/tests/ui/derives/rustc-decodable-issue-123156.rs b/tests/ui/derives/rustc-decodable-issue-123156.rs deleted file mode 100644 index 1983837ed8d..00000000000 --- a/tests/ui/derives/rustc-decodable-issue-123156.rs +++ /dev/null @@ -1,11 +0,0 @@ -//@ check-pass -//@ edition:2021 -//@ aux-build:rustc-serialize.rs - -#![crate_type = "lib"] -#![allow(deprecated, soft_unstable)] - -extern crate rustc_serialize; - -#[derive(RustcDecodable)] -pub enum Foo {} diff --git a/tests/ui/derives/rustc-decodable-issue-123156.stderr b/tests/ui/derives/rustc-decodable-issue-123156.stderr deleted file mode 100644 index 93a993b90d8..00000000000 --- a/tests/ui/derives/rustc-decodable-issue-123156.stderr +++ /dev/null @@ -1,10 +0,0 @@ -Future incompatibility report: Future breakage diagnostic: -warning: use of unstable library feature `rustc_encodable_decodable`: derive macro for `rustc-serialize`; should not be used in new code - --> $DIR/rustc-decodable-issue-123156.rs:10:10 - | -LL | #[derive(RustcDecodable)] - | ^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #64266 <https://github.com/rust-lang/rust/issues/64266> - diff --git a/tests/ui/feature-gates/feature-gate-rustc_encodable_decodable.rs b/tests/ui/feature-gates/feature-gate-rustc_encodable_decodable.rs deleted file mode 100644 index 71caf43806d..00000000000 --- a/tests/ui/feature-gates/feature-gate-rustc_encodable_decodable.rs +++ /dev/null @@ -1,16 +0,0 @@ -#![crate_type = "lib"] - -// This isn't intended to compile, so it's easiest to just ignore this error. -extern crate rustc_serialize; //~ERROR can't find crate for `rustc_serialize` - -#[derive( - RustcEncodable, - //~^ ERROR use of unstable library feature `rustc_encodable_decodable` - //~^^ WARNING this was previously accepted by the compiler - //~^^^ WARNING use of deprecated macro `RustcEncodable` - RustcDecodable, - //~^ ERROR use of unstable library feature `rustc_encodable_decodable` - //~^^ WARNING this was previously accepted by the compiler - //~^^^ WARNING use of deprecated macro `RustcDecodable` -)] -struct S; diff --git a/tests/ui/feature-gates/feature-gate-rustc_encodable_decodable.stderr b/tests/ui/feature-gates/feature-gate-rustc_encodable_decodable.stderr deleted file mode 100644 index b949dbb9da2..00000000000 --- a/tests/ui/feature-gates/feature-gate-rustc_encodable_decodable.stderr +++ /dev/null @@ -1,66 +0,0 @@ -error[E0463]: can't find crate for `rustc_serialize` - --> $DIR/feature-gate-rustc_encodable_decodable.rs:4:1 - | -LL | extern crate rustc_serialize; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate - | - = help: maybe you need to install the missing components with: `rustup component add rust-src rustc-dev llvm-tools-preview` - -error: use of unstable library feature `rustc_encodable_decodable`: derive macro for `rustc-serialize`; should not be used in new code - --> $DIR/feature-gate-rustc_encodable_decodable.rs:7:5 - | -LL | RustcEncodable, - | ^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #64266 <https://github.com/rust-lang/rust/issues/64266> - = note: `#[deny(soft_unstable)]` on by default - -warning: use of deprecated macro `RustcEncodable`: rustc-serialize is deprecated and no longer supported - --> $DIR/feature-gate-rustc_encodable_decodable.rs:7:5 - | -LL | RustcEncodable, - | ^^^^^^^^^^^^^^ - | - = note: `#[warn(deprecated)]` on by default - -error: use of unstable library feature `rustc_encodable_decodable`: derive macro for `rustc-serialize`; should not be used in new code - --> $DIR/feature-gate-rustc_encodable_decodable.rs:11:5 - | -LL | RustcDecodable, - | ^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #64266 <https://github.com/rust-lang/rust/issues/64266> - -warning: use of deprecated macro `RustcDecodable`: rustc-serialize is deprecated and no longer supported - --> $DIR/feature-gate-rustc_encodable_decodable.rs:11:5 - | -LL | RustcDecodable, - | ^^^^^^^^^^^^^^ - -error: aborting due to 3 previous errors; 2 warnings emitted - -For more information about this error, try `rustc --explain E0463`. -Future incompatibility report: Future breakage diagnostic: -error: use of unstable library feature `rustc_encodable_decodable`: derive macro for `rustc-serialize`; should not be used in new code - --> $DIR/feature-gate-rustc_encodable_decodable.rs:7:5 - | -LL | RustcEncodable, - | ^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #64266 <https://github.com/rust-lang/rust/issues/64266> - = note: `#[deny(soft_unstable)]` on by default - -Future breakage diagnostic: -error: use of unstable library feature `rustc_encodable_decodable`: derive macro for `rustc-serialize`; should not be used in new code - --> $DIR/feature-gate-rustc_encodable_decodable.rs:11:5 - | -LL | RustcDecodable, - | ^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #64266 <https://github.com/rust-lang/rust/issues/64266> - = note: `#[deny(soft_unstable)]` on by default - |
