Skip to content

Commit

Permalink
Add note to emphasize replacing TARGET_TRIPLE (rust-lang#1250)
Browse files Browse the repository at this point in the history
  • Loading branch information
asquared31415 authored Nov 6, 2021
1 parent e009a39 commit 1c9feea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/doc/rustc-dev-guide/src/building/suggested.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ you can write: <!-- date: 2021-09 --><!-- the date comment is for the edition be
"--json-output"
],
"rust-analyzer.rustfmt.overrideCommand": [
"./build/TARGET_TRIPLE/stage0/bin/rustfmt",
"./build/$TARGET_TRIPLE/stage0/bin/rustfmt",
"--edition=2021"
],
"editor.formatOnSave": true,
Expand All @@ -45,6 +45,11 @@ you can write: <!-- date: 2021-09 --><!-- the date comment is for the edition be
in your `.vscode/settings.json` file. This will ask `rust-analyzer` to use
`x.py check` to check the sources, and the stage 0 rustfmt to format them.

> NOTE: Make sure to replace `TARGET_TRIPLE` in the `rust-analyzer.rustfmt.overrideCommand`
> setting with the appropriate target triple for your machine. An example of such
> a triple is `x86_64-unknown-linux-gnu`. An easy way to check your target triple
> is to run `rustc -vV` and checking the `host` value of its output.
If you're running `coc.nvim`, you can use `:CocLocalConfig` to create a
`.vim/coc-settings.json` and enter the same settings as above, but replacing
`editor.formatOnSave: true,` with
Expand Down

0 comments on commit 1c9feea

Please sign in to comment.