mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 04:23:25 +00:00
checkOnSafe.features and checkOnSafe.allFeatures now work identically.
This commit is contained in:
parent
33b9058838
commit
fe21fc2d25
2 changed files with 7 additions and 11 deletions
|
@ -241,15 +241,8 @@ impl Config {
|
||||||
set(value, "/checkOnSave/extraArgs", extra_args);
|
set(value, "/checkOnSave/extraArgs", extra_args);
|
||||||
set(value, "/checkOnSave/command", command);
|
set(value, "/checkOnSave/command", command);
|
||||||
set(value, "/checkOnSave/allTargets", all_targets);
|
set(value, "/checkOnSave/allTargets", all_targets);
|
||||||
if let Some(new_all_features) = get(value, "/checkOnSave/allFeatures") {
|
*all_features = get(value, "/checkOnSave/allFeatures").unwrap_or(self.cargo.all_features);
|
||||||
*all_features = new_all_features;
|
*features = get(value, "/checkOnSave/features").unwrap_or(self.cargo.features.clone());
|
||||||
} else {
|
|
||||||
*all_features = self.cargo.all_features;
|
|
||||||
}
|
|
||||||
set(value, "/checkOnSave/features", features);
|
|
||||||
if features.is_empty() && !self.cargo.features.is_empty() {
|
|
||||||
*features = self.cargo.features.clone();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -326,11 +326,14 @@
|
||||||
"markdownDescription": "Check with all features (will be passed as `--all-features`). Defaults to `rust-analyzer.cargo.allFeatures`."
|
"markdownDescription": "Check with all features (will be passed as `--all-features`). Defaults to `rust-analyzer.cargo.allFeatures`."
|
||||||
},
|
},
|
||||||
"rust-analyzer.checkOnSave.features": {
|
"rust-analyzer.checkOnSave.features": {
|
||||||
"type": "array",
|
"type": [
|
||||||
|
"null",
|
||||||
|
"array"
|
||||||
|
],
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"default": [],
|
"default": null,
|
||||||
"description": "List of features to activate. Defaults to `rust-analyzer.cargo.features`."
|
"description": "List of features to activate. Defaults to `rust-analyzer.cargo.features`."
|
||||||
},
|
},
|
||||||
"rust-analyzer.inlayHints.enable": {
|
"rust-analyzer.inlayHints.enable": {
|
||||||
|
|
Loading…
Reference in a new issue