aboutsummaryrefslogtreecommitdiff
path: root/crates/project_model/src/cargo_workspace.rs
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-05-08 23:07:04 +0100
committerLukas Wirth <[email protected]>2021-05-08 23:07:04 +0100
commitb7e6537935d421afd7e02585aaa5cec92bee63b0 (patch)
tree457d24df41b334116de8d9fad447e5b832477dd2 /crates/project_model/src/cargo_workspace.rs
parent8989fb8315538aece975663c3be4aba867e9ee86 (diff)
Use RUSTC_BOOTSTRAP=1 instead of +nightly when discovering rust_cfgs throughs cargo
Diffstat (limited to 'crates/project_model/src/cargo_workspace.rs')
-rw-r--r--crates/project_model/src/cargo_workspace.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/crates/project_model/src/cargo_workspace.rs b/crates/project_model/src/cargo_workspace.rs
index f1ad00d36..b18699b77 100644
--- a/crates/project_model/src/cargo_workspace.rs
+++ b/crates/project_model/src/cargo_workspace.rs
@@ -375,14 +375,10 @@ fn rustc_discover_host_triple(cargo_toml: &AbsPath) -> Option<String> {
375 375
376fn cargo_config_build_target(cargo_toml: &AbsPath) -> Option<String> { 376fn cargo_config_build_target(cargo_toml: &AbsPath) -> Option<String> {
377 let mut cargo_config = Command::new(toolchain::cargo()); 377 let mut cargo_config = Command::new(toolchain::cargo());
378 cargo_config.current_dir(cargo_toml.parent().unwrap()).args(&[ 378 cargo_config
379 "+nightly", 379 .current_dir(cargo_toml.parent().unwrap())
380 "-Z", 380 .args(&["-Z", "unstable-options", "config", "get", "build.target"])
381 "unstable-options", 381 .env("RUSTC_BOOTSTRAP", "1");
382 "config",
383 "get",
384 "build.target",
385 ]);
386 // if successful we receive `build.target = "target-triple"` 382 // if successful we receive `build.target = "target-triple"`
387 log::debug!("Discovering cargo config target by {:?}", cargo_config); 383 log::debug!("Discovering cargo config target by {:?}", cargo_config);
388 match utf8_stdout(cargo_config) { 384 match utf8_stdout(cargo_config) {