mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
[config] rename cargo.defaultTarget
This commit is contained in:
parent
b7edffe244
commit
ed5af989f4
@ -62,8 +62,8 @@ pub struct CargoConfig {
|
||||
/// Runs cargo check on launch to figure out the correct values of OUT_DIR
|
||||
pub load_out_dirs_from_check: bool,
|
||||
|
||||
/// rustc config
|
||||
pub rustc: RustcConfig,
|
||||
/// rustc target
|
||||
pub default_target: Option<String>,
|
||||
}
|
||||
|
||||
impl Default for CargoConfig {
|
||||
@ -73,7 +73,7 @@ impl Default for CargoConfig {
|
||||
all_features: true,
|
||||
features: Vec::new(),
|
||||
load_out_dirs_from_check: false,
|
||||
rustc: RustcConfig { default_target: None },
|
||||
default_target: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -169,7 +169,7 @@ impl CargoWorkspace {
|
||||
if let Some(parent) = cargo_toml.parent() {
|
||||
meta.current_dir(parent);
|
||||
}
|
||||
if let Some(target) = cargo_features.rustc.default_target.as_ref() {
|
||||
if let Some(target) = cargo_features.default_target.as_ref() {
|
||||
meta.other_options(&[String::from("--filter-platform"), target.clone()]);
|
||||
}
|
||||
let meta = meta.exec().with_context(|| {
|
||||
|
@ -134,7 +134,7 @@ impl Config {
|
||||
set(value, "/cargo/allFeatures", &mut self.cargo.all_features);
|
||||
set(value, "/cargo/features", &mut self.cargo.features);
|
||||
set(value, "/cargo/loadOutDirsFromCheck", &mut self.cargo.load_out_dirs_from_check);
|
||||
set(value, "/cargo/rustc/defaultTarget", &mut self.cargo.rustc.default_target);
|
||||
set(value, "/cargo/defaultTarget", &mut self.cargo.default_target);
|
||||
|
||||
match get(value, "/procMacro/enable") {
|
||||
Some(true) => {
|
||||
|
@ -237,7 +237,7 @@
|
||||
"default": false,
|
||||
"markdownDescription": "Run `cargo check` on startup to get the correct value for package OUT_DIRs"
|
||||
},
|
||||
"rust-analyzer.cargo.rustc.defaultTarget": {
|
||||
"rust-analyzer.cargo.defaultTarget": {
|
||||
"type": [
|
||||
"null",
|
||||
"string"
|
||||
|
Loading…
Reference in New Issue
Block a user