diff options
author | Christophe MASSOLIN <christophe.massolin@gmail.com> | 2020-04-27 23:15:54 +0100 |
---|---|---|
committer | Christophe MASSOLIN <christophe.massolin@gmail.com> | 2020-04-27 23:15:54 +0100 |
commit | ed5af989f431b9bfabf6f67350587add05a1942c (patch) | |
tree | f81d1efdca7964e8898226c9c8fb875a8600b2dd /crates | |
parent | b7edffe244581b428a4b4da4ff6a08ab461b018f (diff) |
[config] rename cargo.defaultTarget
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_project_model/src/cargo_workspace.rs | 8 | ||||
-rw-r--r-- | crates/rust-analyzer/src/config.rs | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_project_model/src/cargo_workspace.rs b/crates/ra_project_model/src/cargo_workspace.rs index 810833b64..1dfee6b47 100644 --- a/crates/ra_project_model/src/cargo_workspace.rs +++ b/crates/ra_project_model/src/cargo_workspace.rs | |||
@@ -62,8 +62,8 @@ pub struct CargoConfig { | |||
62 | /// Runs cargo check on launch to figure out the correct values of OUT_DIR | 62 | /// Runs cargo check on launch to figure out the correct values of OUT_DIR |
63 | pub load_out_dirs_from_check: bool, | 63 | pub load_out_dirs_from_check: bool, |
64 | 64 | ||
65 | /// rustc config | 65 | /// rustc target |
66 | pub rustc: RustcConfig, | 66 | pub default_target: Option<String>, |
67 | } | 67 | } |
68 | 68 | ||
69 | impl Default for CargoConfig { | 69 | impl Default for CargoConfig { |
@@ -73,7 +73,7 @@ impl Default for CargoConfig { | |||
73 | all_features: true, | 73 | all_features: true, |
74 | features: Vec::new(), | 74 | features: Vec::new(), |
75 | load_out_dirs_from_check: false, | 75 | load_out_dirs_from_check: false, |
76 | rustc: RustcConfig { default_target: None }, | 76 | default_target: None, |
77 | } | 77 | } |
78 | } | 78 | } |
79 | } | 79 | } |
@@ -169,7 +169,7 @@ impl CargoWorkspace { | |||
169 | if let Some(parent) = cargo_toml.parent() { | 169 | if let Some(parent) = cargo_toml.parent() { |
170 | meta.current_dir(parent); | 170 | meta.current_dir(parent); |
171 | } | 171 | } |
172 | if let Some(target) = cargo_features.rustc.default_target.as_ref() { | 172 | if let Some(target) = cargo_features.default_target.as_ref() { |
173 | meta.other_options(&[String::from("--filter-platform"), target.clone()]); | 173 | meta.other_options(&[String::from("--filter-platform"), target.clone()]); |
174 | } | 174 | } |
175 | let meta = meta.exec().with_context(|| { | 175 | let meta = meta.exec().with_context(|| { |
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 908208ece..25404ef90 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs | |||
@@ -134,7 +134,7 @@ impl Config { | |||
134 | set(value, "/cargo/allFeatures", &mut self.cargo.all_features); | 134 | set(value, "/cargo/allFeatures", &mut self.cargo.all_features); |
135 | set(value, "/cargo/features", &mut self.cargo.features); | 135 | set(value, "/cargo/features", &mut self.cargo.features); |
136 | set(value, "/cargo/loadOutDirsFromCheck", &mut self.cargo.load_out_dirs_from_check); | 136 | set(value, "/cargo/loadOutDirsFromCheck", &mut self.cargo.load_out_dirs_from_check); |
137 | set(value, "/cargo/rustc/defaultTarget", &mut self.cargo.rustc.default_target); | 137 | set(value, "/cargo/defaultTarget", &mut self.cargo.default_target); |
138 | 138 | ||
139 | match get(value, "/procMacro/enable") { | 139 | match get(value, "/procMacro/enable") { |
140 | Some(true) => { | 140 | Some(true) => { |