Recommend `rustfmt --edition=2021`

This commit is contained in:
Noah Lev 2021-09-19 11:19:51 -07:00 committed by Joshua Nelson
parent afbcc3efa9
commit ceec906a31
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -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