Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up scaffolding for 2024 #288

Merged
merged 2 commits into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,13 @@
- [Warnings promoted to errors](rust-2021/warnings-promoted-to-error.md)
- [Or patterns in macro-rules](rust-2021/or-patterns-macro-rules.md)
- [C-string literals](rust-2021/c-string-literals.md)

## Rust 2024

- [Rust 2024 🚧](rust-2024/index.md)
- [`unsafe_op_in_unsafe_fn` warning](rust-2024/unsafe-op-in-unsafe-fn.md)
- [RPIT lifetime capture](rust-2024/rpit-lifetime-capture.md)
- [Disallow references to `static mut`](rust-2024/static-mut-reference.md)
- [Public/private dependencies](rust-2024/public-private-dependencies.md)
- [Cargo: Remove implicit features](rust-2024/cargo-remove-implicit-features.md)
- [Rustfmt: Combine all delimited exprs as last argument](rust-2024/rustfmt-overflow-delimited-expr.md)
19 changes: 19 additions & 0 deletions src/editions/transitioning-an-existing-project-to-a-new-edition.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,26 @@ If new warnings are issued, you may want to consider running `cargo fix` again (

Congrats! Your code is now valid in both Rust 2015 and Rust 2018!

## Migrating to an unstable edition

After an edition is released, there is roughly a three year window before the next edition.
During that window, new features may be added to the next edition, which will only be available on the [nightly channel].
If you want to help test those new features before they are stabilized, you can use the nightly channel to try them out.

The steps are roughly similar to the stable channel:

1. Install the most recent nightly: `rustup update nightly`.
2. Run `cargo +nightly fix --edition`.
3. Edit `Cargo.toml` and place `cargo-features = ["edition2024"]` at the top (above `[package]`), and change the edition field to say `edition = "2024"`.
4. Run `cargo +nightly check` to verify it now works in the new edition.

> **⚠ Caution**: Features implemented in the next edition may not have automatic migrations implemented with `cargo fix`, and the features themselves may not be finished.
> When possible, this guide should contain information about which features are implemented
> on nightly along with more information about their status.
> A few months before the edition is stabilized, all of the new features should be fully implemented, and the [Rust Blog] will announce a call for testing.

[`cargo fix`]: ../../cargo/commands/cargo-fix.html
[`cargo test`]: ../../cargo/commands/cargo-test.html
[Advanced migration strategies]: advanced-migrations.md
[nightly channel]: ../../book/appendix-07-nightly-rust.html
[Rust Blog]: https://blog.rust-lang.org/
9 changes: 9 additions & 0 deletions src/rust-2024/cargo-remove-implicit-features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Cargo: Remove implicit features

🚧 The 2024 Edition has not yet been released and hence this section is still "under construction".

## Summary

## Details

## Migration
21 changes: 21 additions & 0 deletions src/rust-2024/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Rust 2024

🚧 The 2024 Edition has not yet been released and hence this section is still "under construction".

| Info | |
| --- | --- |
| RFC | [#3501](https://rust-lang.github.io/rfcs/3501-edition-2024.html) |
| Release version | 1.82.0 (anticipated) |

The Rust 2024 Edition is currently slated for release in Rust 1.82.0.
Rust 1.82.0 will be in beta for six weeks,
after which it is released as stable on October 17th.

However, note that Rust is a project run by volunteers.
We prioritize the personal well-being of everyone working on Rust
over any deadlines and expectations we might have set.
This could mean delaying the edition a version if necessary,
or dropping a feature that turns out to be too difficult or stressful to finish in time.

That said, we are on schedule and many of the difficult problems are already tackled,
thanks to all the people contributing to Rust 2024! 💛
9 changes: 9 additions & 0 deletions src/rust-2024/public-private-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Public/private dependencies

🚧 The 2024 Edition has not yet been released and hence this section is still "under construction".

## Summary

## Details

## Migration
9 changes: 9 additions & 0 deletions src/rust-2024/rpit-lifetime-capture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# RPIT lifetime capture

🚧 The 2024 Edition has not yet been released and hence this section is still "under construction".

## Summary

## Details

## Migration
9 changes: 9 additions & 0 deletions src/rust-2024/rustfmt-overflow-delimited-expr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Rustfmt: Combine all delimited exprs as last argument

🚧 The 2024 Edition has not yet been released and hence this section is still "under construction".

## Summary

## Details

## Migration
9 changes: 9 additions & 0 deletions src/rust-2024/static-mut-reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Disallow references to static mut

🚧 The 2024 Edition has not yet been released and hence this section is still "under construction".

## Summary

## Details

## Migration
9 changes: 9 additions & 0 deletions src/rust-2024/unsafe-op-in-unsafe-fn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# unsafe_op_in_unsafe_fn warning

🚧 The 2024 Edition has not yet been released and hence this section is still "under construction".

## Summary

## Details

## Migration