Skip to content

Commit 0ab4340

Browse files
committed
Rename defaultTarget to target
1 parent e752351 commit 0ab4340

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

crates/ra_project_model/src/cargo_workspace.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub struct CargoConfig {
5858
pub load_out_dirs_from_check: bool,
5959

6060
/// rustc target
61-
pub default_target: Option<String>,
61+
pub target: Option<String>,
6262
}
6363

6464
impl Default for CargoConfig {
@@ -68,7 +68,7 @@ impl Default for CargoConfig {
6868
all_features: true,
6969
features: Vec::new(),
7070
load_out_dirs_from_check: false,
71-
default_target: None,
71+
target: None,
7272
}
7373
}
7474
}
@@ -164,7 +164,7 @@ impl CargoWorkspace {
164164
if let Some(parent) = cargo_toml.parent() {
165165
meta.current_dir(parent);
166166
}
167-
if let Some(target) = cargo_features.default_target.as_ref() {
167+
if let Some(target) = cargo_features.target.as_ref() {
168168
meta.other_options(&[String::from("--filter-platform"), target.clone()]);
169169
}
170170
let meta = meta.exec().with_context(|| {

crates/rust-analyzer/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ impl Config {
134134
set(value, "/cargo/allFeatures", &mut self.cargo.all_features);
135135
set(value, "/cargo/features", &mut self.cargo.features);
136136
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);
138138

139139
match get(value, "/procMacro/enable") {
140140
Some(true) => {

editors/code/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,13 +237,13 @@
237237
"default": false,
238238
"markdownDescription": "Run `cargo check` on startup to get the correct value for package OUT_DIRs"
239239
},
240-
"rust-analyzer.cargo.defaultTarget": {
240+
"rust-analyzer.cargo.target": {
241241
"type": [
242242
"null",
243243
"string"
244244
],
245245
"default": null,
246-
"description": "Specify the default target"
246+
"description": "Specify the compilation target"
247247
},
248248
"rust-analyzer.rustfmt.extraArgs": {
249249
"type": "array",

0 commit comments

Comments
 (0)