Skip to content

Commit 25350e4

Browse files
コピーした英語本文を Edition Guide の最新版に追従
1 parent 8e84797 commit 25350e4

File tree

5 files changed

+4
-124
lines changed

5 files changed

+4
-124
lines changed

src/SUMMARY.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@
107107
- [Rustfmt](rust-2024/rustfmt.md)
108108
- [Rustfmt: Style edition](rust-2024/rustfmt-style-edition.md)
109109
- [Rustfmt: Formatting fixes](rust-2024/rustfmt-formatting-fixes.md)
110-
- [Rustfmt: Combine all delimited exprs as last argument](rust-2024/rustfmt-overflow-delimited-expr.md)
111110
- [Rustfmt: Raw identifier sorting](rust-2024/rustfmt-raw-identifier-sorting.md)
112111
- [Rustfmt: Version sorting](rust-2024/rustfmt-version-sorting.md)
113112
-->
@@ -141,6 +140,5 @@
141140
- [Rustfmt](rust-2024/rustfmt.md)
142141
- [Rustfmt: Style edition](rust-2024/rustfmt-style-edition.md)
143142
- [Rustfmt: Formatting fixes](rust-2024/rustfmt-formatting-fixes.md)
144-
- [Rustfmt: Combine all delimited exprs as last argument](rust-2024/rustfmt-overflow-delimited-expr.md)
145143
- [Rustfmt: Raw identifier sorting](rust-2024/rustfmt-raw-identifier-sorting.md)
146144
- [Rustfmt: Version sorting](rust-2024/rustfmt-version-sorting.md)

src/rust-2024/prelude.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

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

1110
[`Future`]: ../../std/future/trait.Future.html
1211
[`IntoFuture`]: ../../std/future/trait.IntoFuture.html
@@ -31,19 +30,6 @@ It's identical to the current one, except for the following changes:
3130
- Added:
3231
- [`std::future::Future`][`Future`]
3332
- [`std::future::IntoFuture`][`IntoFuture`]
34-
- Removed:
35-
- `RustcEncodable`
36-
- `RustcDecodable`
37-
38-
### `RustcEncodable` and `RustcDecodable` removal
39-
40-
`RustcEncodable` and `RustcDecodable` are two undocumented derive macros that have been removed from the prelude.
41-
These were deprecated before Rust 1.0, but remained within the standard library prelude.
42-
The 2024 Edition has removed these from the prelude since they are not expected to be used.
43-
44-
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].
45-
46-
[crates.io]: https://crates.io/categories/encoding
4733

4834
## Migration
4935

@@ -92,15 +78,3 @@ Alternatively, you can manually enable the lint to find places where these quali
9278
```
9379

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

src/rust-2024/rustfmt-overflow-delimited-expr.md

Lines changed: 0 additions & 92 deletions
This file was deleted.

src/rust-2024/static-mut-references.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ The [atomic types][atomics] provide integers, pointers, and booleans that can be
7070
# use std::sync::atomic::Ordering;
7171
# use std::sync::atomic::AtomicU64;
7272
73-
// Chnage from this:
73+
// Change from this:
7474
// static mut COUNTER: u64 = 0;
7575
// to this:
7676
static COUNTER: AtomicU64 = AtomicU64::new(0);

src/rust-2024/temporary-if-let-scope.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ fn f(value: &RwLock<Option<bool>>) {
4343
}
4444
// <--- Read lock is dropped here in 2024
4545
else {
46-
let mut s = value.write().unwrap();
47-
if s.is_none() {
48-
*s = Some(true);
46+
let mut v = value.write().unwrap();
47+
if v.is_none() {
48+
*v = Some(true);
4949
}
5050
}
5151
}

0 commit comments

Comments
 (0)