diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_project_model/src/cargo_workspace.rs | 6 | ||||
-rw-r--r-- | crates/rust-analyzer/src/config.rs | 2 |
2 files changed, 4 insertions, 4 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 | ||
64 | impl Default for CargoConfig { | 64 | impl 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) => { |