You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[`if let` temporary scope](https://doc.rust-lang.org/edition-guide/rust-2024/temporary-if-let-scope.html) — Changes the scope of temporaries for `if let` expressions.
33
33
-[Tail expression temporary scope](https://doc.rust-lang.org/edition-guide/rust-2024/temporary-tail-expr-scope.html) — Changes the scope of temporaries for the tail expression in a block.
34
-
-[Match ergonomics reservations](https://doc.rust-lang.org/edition-guide/rust-2024/match-ergonomics.html) — New restrictions on pattern binding modes.
34
+
-[Match ergonomics reservations](https://doc.rust-lang.org/edition-guide/rust-2024/match-ergonomics.html) — Disallow some pattern combinations to avoid confusion and allow for future improvements.
35
35
-[Unsafe `extern` blocks](https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-extern.html) — `extern` blocks now require the `unsafe` keyword.
36
36
-[Unsafe attributes](https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-attributes.html) — The `export_name`, `link_section`, and `no_mangle` attributes must now be marked as `unsafe`.
37
37
-[`unsafe_op_in_unsafe_fn` warning](https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html) — The [`unsafe_op_in_unsafe_fn`](https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html#unsafe-op-in-unsafe-fn) lint now warns by default, requiring explicit `unsafe {}` blocks in `unsafe` functions.
@@ -55,7 +55,6 @@ This is the largest edition we have released. The [edition guide](https://doc.ru
55
55
- Rustfmt
56
56
-[Rustfmt: Style edition](https://doc.rust-lang.org/edition-guide/rust-2024/rustfmt-style-edition.html) — Introduces the concept of "style editions", which allow you to independently control the formatting edition from the Rust edition.
57
57
-[Rustfmt: Formatting fixes](https://doc.rust-lang.org/edition-guide/rust-2024/rustfmt-formatting-fixes.html) — A large number of fixes to formatting various situations.
58
-
-[Rustfmt: Combine all delimited exprs as last argument](https://doc.rust-lang.org/edition-guide/rust-2024/rustfmt-overflow-delimited-expr.html) — Changes to multi-line expressions as the last argument.
59
58
-[Rustfmt: Raw identifier sorting](https://doc.rust-lang.org/edition-guide/rust-2024/rustfmt-raw-identifier-sorting.html) — Changes to how `r#foo` identifiers are sorted.
60
59
-[Rustfmt: Version sorting](https://doc.rust-lang.org/edition-guide/rust-2024/rustfmt-version-sorting.html) — Changes to how identifiers that contain integers are sorted.
61
60
@@ -65,6 +64,8 @@ The guide includes migration instructions for all new features, and in general
65
64
[transitioning an existing project to a new edition](https://doc.rust-lang.org/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html).
66
65
In many cases `cargo fix` can automate the necessary changes. You may even find that no changes in your code are needed at all for 2024!
67
66
67
+
Note that automatic fixes via `cargo fix` are very conservative to avoid ever changing the semantics of your code. In many cases you may wish to keep your code the same and use the new semantics of Rust 2024; for instance, continuing to use the `expr` macro matcher, and ignoring the conversions of conditionals because you want the new 2024 drop order semantics. The result of `cargo fix` should not be considered a recommendation, just a conservative conversion that preserves behavior.
68
+
68
69
*Many* people came together to create this edition. We'd like to thank them all for their hard work!
69
70
70
71
### `async` closures
@@ -76,8 +77,6 @@ In many cases `cargo fix` can automate the necessary changes. You may even find
The new `#[diagnostic::do_not_recommend]` attribute is a hint to the compiler to not show the annotated trait implementation as part of a diagnostic message. For library authors, this is a way to keep the compiler from making suggestions that may be unhelpful or misleading. For example:
82
81
83
82
```rust
@@ -150,7 +149,7 @@ fn main() {
150
149
[0, 1, 16, 81, 256, 625, 1296, 2401, 4096, 6561]
151
150
```
152
151
153
-
### Updates to `home_dir()`
152
+
### Updates to `std::env::home_dir()`
154
153
155
154
`std::env::home_dir()` has been deprecated for years, because it can give surprising results in some Windows configurations if the `HOME` environment variable is set (which is not the normal configuration on Windows). We had previously avoided changing its behavior, out of concern for compatibility with code depending on this non-standard configuration. Given how long this function has been deprecated, we're now updating its behavior as a bug fix, and a subsequent release will remove the deprecation for this function.
0 commit comments