File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ You can also install the hook as a step of running `x.py setup`!
22
22
a file. By default, ` rust-analyzer ` runs the ` cargo check ` and ` rustfmt `
23
23
commands, but you can override these commands to use more adapted versions
24
24
of these tools when hacking on ` rustc ` . For example, for Visual Studio Code,
25
- you can write:
25
+ you can write: <!-- date: 2021-09 --> <!-- the date comment is for the edition below -->
26
26
27
27
``` JSON
28
28
{
@@ -32,7 +32,8 @@ you can write:
32
32
" --json-output"
33
33
],
34
34
"rust-analyzer.rustfmt.overrideCommand" : [
35
- " ./build/TARGET_TRIPLE/stage0/bin/rustfmt"
35
+ " ./build/TARGET_TRIPLE/stage0/bin/rustfmt" ,
36
+ " --edition=2018"
36
37
],
37
38
"editor.formatOnSave" : true ,
38
39
"rust-analyzer.cargo.runBuildScripts" : false ,
Original file line number Diff line number Diff line change @@ -293,6 +293,8 @@ format-on-save turned on. It's a good habit to run `./x.py fmt` before every
293
293
commit, as this reduces conflicts later. The pinned version is built under
294
294
` build/<target>/stage0/bin/rustfmt ` , so if you want, you can use it for a
295
295
single file or for format-on-save in your editor, which can be faster than ` ./x.py fmt ` .
296
+ You'll have to pass the <!-- date: 2021-09 --> ` --edition=2018 ` argument
297
+ yourself when calling ` rustfmt ` directly.
296
298
297
299
One last thing: you can use ` RUSTC_LOG=XXX ` to get debug logging. [ Read more
298
300
here] [ logging ] . Notice the ` C ` in ` RUSTC_LOG ` . Other than that, it uses normal
You can’t perform that action at this time.
0 commit comments