-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove RustcEncodable/Decodable from 2024 prelude
- Loading branch information
Showing
6 changed files
with
111 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
tests/ui/feature-gates/feature-gate-rustc_encodable_decodable.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#![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; |
44 changes: 44 additions & 0 deletions
44
tests/ui/feature-gates/feature-gate-rustc_encodable_decodable.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
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': unstable implementation detail of the `rustc` compiler, do not use | ||
--> $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': unstable implementation detail of the `rustc` compiler, do not use | ||
--> $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`. |