Skip to content

Commit

Permalink
Recommend rustfmt --edition=2021
Browse files Browse the repository at this point in the history
  • Loading branch information
camelid authored and jyn514 committed Oct 10, 2021
1 parent afbcc3e commit ceec906
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/building/suggested.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ you can write: <!-- date: 2021-09 --><!-- the date comment is for the edition be
],
"rust-analyzer.rustfmt.overrideCommand": [
"./build/TARGET_TRIPLE/stage0/bin/rustfmt",
"--edition=2018"
"--edition=2021"
],
"editor.formatOnSave": true,
"rust-analyzer.cargo.runBuildScripts": false,
Expand Down
2 changes: 1 addition & 1 deletion src/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ format-on-save turned on. It's a good habit to run `./x.py fmt` before every
commit, as this reduces conflicts later. The pinned version is built under
`build/<target>/stage0/bin/rustfmt`, so if you want, you can use it for a
single file or for format-on-save in your editor, which can be faster than `./x.py fmt`.
You'll have to pass the <!-- date: 2021-09 --> `--edition=2018` argument
You'll have to pass the <!-- date: 2021-09 --> `--edition=2021` argument
yourself when calling `rustfmt` directly.

One last thing: you can use `RUSTC_LOG=XXX` to get debug logging. [Read more
Expand Down

0 comments on commit ceec906

Please sign in to comment.