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
Copy file name to clipboardExpand all lines: src/editions/transitioning-an-existing-project-to-a-new-edition.md
+19
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,26 @@ If new warnings are issued, you may want to consider running `cargo fix` again (
83
83
84
84
Congrats! Your code is now valid in both Rust 2015 and Rust 2018!
85
85
86
+
## Migrating to an unstable edition
87
+
88
+
After an edition is released, there is roughly a three year window before the next edition.
89
+
During that window, new features may be added to the next edition, which will only be available on the [nightly channel].
90
+
If you want to help test those new features before they are stabilized, you can use the nightly channel to try them out.
91
+
92
+
The steps are roughly similar to the stable channel:
93
+
94
+
1. Install the most recent nightly: `rustup update nightly`.
95
+
2. Run `cargo +nightly fix --edition`.
96
+
3. Edit `Cargo.toml` and place `cargo-features = ["edition2024"]` at the top (above `[package]`), and change the edition field to say `edition = "2024"`.
97
+
4. Run `cargo +nightly check` to verify it now works in the new edition.
98
+
99
+
> **⚠ Caution**: Features implemented in the next edition may not have automatic migrations implemented with `cargo fix`, and the features themselves may not be finished.
100
+
> When possible, this guide should contain information about which features are implemented
101
+
> on nightly along with more information about their status.
102
+
> 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.
0 commit comments