Skip to content

Commit 466f68e

Browse files
committed
Add cargo fix command to prelude migration section
1 parent c60e2af commit 466f68e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/rust-2021/prelude.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ The tracking issue [can be found here](https://github.com/rust-lang/rust/issues/
3737

3838
As a part of the 2021 edition a migration lint, `rust_2021_prelude_collisions`, has been added in order to aid in automatic migration of Rust 2018 codebases to Rust 2021.
3939

40+
In order to have rustfix migrate your code to be Rust 2021 Edition compatible, run:
41+
42+
```
43+
cargo fix --edition
44+
```
45+
4046
### Implementation Reference
4147

4248
The lint needs to take a couple of factors into account when determining whether or not introducing 2021 Edition to a codebase will cause a name resolution collision (thus breaking the code after changing edition). These factors include:

0 commit comments

Comments
 (0)