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/doc/src/reference/unstable.md
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -126,6 +126,7 @@ Each new feature described below should explain how to use it.
126
126
*[native-completions](#native-completions) --- Move cargo shell completions to native completions.
127
127
*[warnings](#warnings) --- controls warning behavior; options for allowing or denying warnings.
128
128
*[Package message format](#package-message-format) --- Message format for `cargo package`.
129
+
*[`fix-edition`](#fix-edition) --- A permanently unstable edition migration helper.
129
130
130
131
## allow-features
131
132
@@ -1915,6 +1916,19 @@ When new editions are introduced, the `unstable-editions` feature is required un
1915
1916
1916
1917
The special "future" edition is a home for new features that are under development, and is permanently unstable. The "future" edition also has no new behavior by itself. Each change in the future edition requires an opt-in such as a `#![feature(...)]` attribute.
1917
1918
1919
+
## `fix-edition`
1920
+
1921
+
`-Zfix-edition` is a permanently unstable flag to assist with testing edition migrations, particularly with the use of crater. It only works with the `cargo fix` subcommand. It takes two different forms:
1922
+
1923
+
-`-Zfix-edition=start=$INITIAL` --- This form checks if the current edition is equal to the given number. If not, it exits with success (because we want to ignore older editions). If it is, then it runs the equivalent of `cargo check`. This is intended to be used with crater's "start" toolchain to set a baseline for the "before" toolchain.
1924
+
-`-Zfix-edition=end=$INITIAL,$NEXT` --- This form checks if the current edition is equal to the given `$INITIAL` value. If not, it exits with success. If it is, then it performs an edition migration to the edition specified in `$NEXT`. Afterwards, it will modify `Cargo.toml` to add the appropriate `cargo-features = ["unstable-edition"]`, update the `edition` field, and run the equivalent of `cargo check` to verify that the migration works on the new edition.
0 commit comments