Skip to content

Commit f56aecc

Browse files
authored
Merge pull request #353 from RalfJung/serialize-removal
Rustc{En,De}codable has been removed
2 parents 8889501 + e748759 commit f56aecc

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

Diff for: src/rust-2024/prelude.md

-26
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
- The [`Future`] and [`IntoFuture`] traits are now part of the prelude.
66
- This might make calls to trait methods ambiguous which could make some code fail to compile.
7-
- `RustcEncodable` and `RustcDecodable` have been removed from the prelude.
87

98
[`Future`]: ../../std/future/trait.Future.html
109
[`IntoFuture`]: ../../std/future/trait.IntoFuture.html
@@ -29,19 +28,6 @@ It's identical to the current one, except for the following changes:
2928
- Added:
3029
- [`std::future::Future`][`Future`]
3130
- [`std::future::IntoFuture`][`IntoFuture`]
32-
- Removed:
33-
- `RustcEncodable`
34-
- `RustcDecodable`
35-
36-
### `RustcEncodable` and `RustcDecodable` removal
37-
38-
`RustcEncodable` and `RustcDecodable` are two undocumented derive macros that have been removed from the prelude.
39-
These were deprecated before Rust 1.0, but remained within the standard library prelude.
40-
The 2024 Edition has removed these from the prelude since they are not expected to be used.
41-
42-
If in the unlikely case there is a project still using these, it is recommended to switch to a serialization library, such as those found on [crates.io].
43-
44-
[crates.io]: https://crates.io/categories/encoding
4531

4632
## Migration
4733

@@ -90,15 +76,3 @@ Alternatively, you can manually enable the lint to find places where these quali
9076
```
9177

9278
[`rust_2024_prelude_collisions`]: ../../rustc/lints/listing/allowed-by-default.html#rust-2024-prelude-collisions
93-
94-
### `RustcEncodable` and `RustcDecodable`
95-
96-
It is strongly recommended that you migrate to a different serialization library if you are still using these.
97-
However, these derive macros are still available in the standard library, they are just required to be imported from the older prelude now:
98-
99-
```rust,edition2021
100-
#[allow(soft_unstable)]
101-
use core::prelude::v1::{RustcDecodable, RustcEncodable};
102-
```
103-
104-
There is no automatic migration for this change; you will need to make the update manually.

0 commit comments

Comments
 (0)