Skip to content

Commit 76183a5

Browse files
authored
Rollup merge of rust-lang#133712 - RalfJung:rust_analyzer_settings, r=jieyouxu
rust_analyzer_settings: force use of 'nightly' toolchain The cranelift folder contains a rust-toolchain file. That means when RA opens `compiler/rustc_codegen_cranelift/Cargo.toml`, it will try to use that toolchain or fail. (Maybe that toolchain gets auto-installed for others? On my system, it just fails, but I also run vscodium in a sandbox.) However, it shouldn't be necessary to use more than one toolchain for the rustc workspace. So we can set the `RUSTUP_TOOLCHAIN` variable on the server side to force the same toolchain to be used everywhere. Suggested by `@ChayimFriedman2` in rust-lang/rust-analyzer#18585.
2 parents 1391039 + fd13717 commit 76183a5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/bootstrap/src/core/build_steps/setup.rs

+1
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,7 @@ Select which editor you would like to set up [default: None]: ";
572572
"828666b021d837a33e78d870b56d34c88a5e2c85de58b693607ec574f0c27000",
573573
"811fb3b063c739d261fd8590dd30242e117908f5a095d594fa04585daa18ec4d",
574574
"4eecb58a2168b252077369da446c30ed0e658301efe69691979d1ef0443928f4",
575+
"c394386e6133bbf29ffd32c8af0bb3d4aac354cba9ee051f29612aa9350f8f8d",
575576
],
576577
EditorKind::Emacs => vec![
577578
"51068d4747a13732440d1a8b8f432603badb1864fa431d83d0fd4f8fa57039e0",

src/etc/rust_analyzer_settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,8 @@
3434
"rust-analyzer.rustc.source": "./Cargo.toml",
3535
"rust-analyzer.cargo.extraEnv": {
3636
"RUSTC_BOOTSTRAP": "1"
37+
},
38+
"rust-analyzer.server.extraEnv": {
39+
"RUSTUP_TOOLCHAIN": "nightly"
3740
}
3841
}

0 commit comments

Comments
 (0)