Recommend `rustfmt --edition=2021`
This commit is contained in:
parent
afbcc3efa9
commit
ceec906a31
|
|
@ -33,7 +33,7 @@ you can write: <!-- date: 2021-09 --><!-- the date comment is for the edition be
|
||||||
],
|
],
|
||||||
"rust-analyzer.rustfmt.overrideCommand": [
|
"rust-analyzer.rustfmt.overrideCommand": [
|
||||||
"./build/TARGET_TRIPLE/stage0/bin/rustfmt",
|
"./build/TARGET_TRIPLE/stage0/bin/rustfmt",
|
||||||
"--edition=2018"
|
"--edition=2021"
|
||||||
],
|
],
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"rust-analyzer.cargo.runBuildScripts": false,
|
"rust-analyzer.cargo.runBuildScripts": false,
|
||||||
|
|
|
||||||
|
|
@ -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
|
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
|
`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`.
|
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.
|
yourself when calling `rustfmt` directly.
|
||||||
|
|
||||||
One last thing: you can use `RUSTC_LOG=XXX` to get debug logging. [Read more
|
One last thing: you can use `RUSTC_LOG=XXX` to get debug logging. [Read more
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue