aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_project_model/src/cargo_workspace.rs6
-rw-r--r--crates/rust-analyzer/src/config.rs2
-rw-r--r--editors/code/package.json4
3 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_project_model/src/cargo_workspace.rs b/crates/ra_project_model/src/cargo_workspace.rs
index 31499b468..59f46a2a0 100644
--- a/crates/ra_project_model/src/cargo_workspace.rs
+++ b/crates/ra_project_model/src/cargo_workspace.rs
@@ -58,7 +58,7 @@ pub struct CargoConfig {
58 pub load_out_dirs_from_check: bool, 58 pub load_out_dirs_from_check: bool,
59 59
60 /// rustc target 60 /// rustc target
61 pub default_target: Option<String>, 61 pub target: Option<String>,
62} 62}
63 63
64impl Default for CargoConfig { 64impl Default for CargoConfig {
@@ -68,7 +68,7 @@ impl Default for CargoConfig {
68 all_features: true, 68 all_features: true,
69 features: Vec::new(), 69 features: Vec::new(),
70 load_out_dirs_from_check: false, 70 load_out_dirs_from_check: false,
71 default_target: None, 71 target: None,
72 } 72 }
73 } 73 }
74} 74}
@@ -164,7 +164,7 @@ impl CargoWorkspace {
164 if let Some(parent) = cargo_toml.parent() { 164 if let Some(parent) = cargo_toml.parent() {
165 meta.current_dir(parent); 165 meta.current_dir(parent);
166 } 166 }
167 if let Some(target) = cargo_features.default_target.as_ref() { 167 if let Some(target) = cargo_features.target.as_ref() {
168 meta.other_options(&[String::from("--filter-platform"), target.clone()]); 168 meta.other_options(&[String::from("--filter-platform"), target.clone()]);
169 } 169 }
170 let meta = meta.exec().with_context(|| { 170 let meta = meta.exec().with_context(|| {
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index 25404ef90..4b2570d4d 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/defaultTarget", &mut self.cargo.default_target); 137 set(value, "/cargo/target", &mut self.cargo.target);
138 138
139 match get(value, "/procMacro/enable") { 139 match get(value, "/procMacro/enable") {
140 Some(true) => { 140 Some(true) => {
diff --git a/editors/code/package.json b/editors/code/package.json
index 775bdaf17..d363e9fbb 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -237,13 +237,13 @@
237 "default": false, 237 "default": false,
238 "markdownDescription": "Run `cargo check` on startup to get the correct value for package OUT_DIRs" 238 "markdownDescription": "Run `cargo check` on startup to get the correct value for package OUT_DIRs"
239 }, 239 },
240 "rust-analyzer.cargo.defaultTarget": { 240 "rust-analyzer.cargo.target": {
241 "type": [ 241 "type": [
242 "null", 242 "null",
243 "string" 243 "string"
244 ], 244 ],
245 "default": null, 245 "default": null,
246 "description": "Specify the default target" 246 "description": "Specify the compilation target"
247 }, 247 },
248 "rust-analyzer.rustfmt.extraArgs": { 248 "rust-analyzer.rustfmt.extraArgs": {
249 "type": "array", 249 "type": "array",