Skip to content

Commit 348829f

Browse files
committed
Flip default features config
1 parent 1c21b14 commit 348829f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ config_data! {
7070
/// List of features to activate. Set to `"all"` to pass `--all-features` to cargo.
7171
cargo_features: CargoFeatures = "[]",
7272
/// Do not activate the `default` feature.
73-
cargo_noDefaultFeatures: bool = "false",
73+
cargo_defaultFeatures: bool = "true",
7474
/// Internal config for debugging, disables loading of sysroot crates.
7575
cargo_noSysroot: bool = "false",
7676
/// Compilation target override (target triple).
@@ -90,7 +90,7 @@ config_data! {
9090
/// `#rust-analyzer.cargo.features#`. Set to `"all"` to pass `--all-features` to cargo.
9191
checkOnSave_features: Option<CargoFeatures> = "null",
9292
/// Do not activate the `default` feature.
93-
checkOnSave_noDefaultFeatures: Option<bool> = "null",
93+
checkOnSave_defaultFeatures: Option<bool> = "null",
9494
/// Advanced option, fully override the command rust-analyzer uses for
9595
/// checking. The command should include `--message-format=json` or
9696
/// similar option.
@@ -877,7 +877,7 @@ impl Config {
877877
});
878878

879879
CargoConfig {
880-
no_default_features: self.data.cargo_noDefaultFeatures,
880+
no_default_features: !self.data.cargo_defaultFeatures,
881881
all_features: matches!(self.data.cargo_features, CargoFeatures::All),
882882
features: match &self.data.cargo_features {
883883
CargoFeatures::All => vec![],
@@ -924,10 +924,10 @@ impl Config {
924924
.clone()
925925
.or_else(|| self.data.cargo_target.clone()),
926926
all_targets: self.data.checkOnSave_allTargets,
927-
no_default_features: self
927+
no_default_features: !self
928928
.data
929-
.checkOnSave_noDefaultFeatures
930-
.unwrap_or(self.data.cargo_noDefaultFeatures),
929+
.checkOnSave_defaultFeatures
930+
.unwrap_or(self.data.cargo_defaultFeatures),
931931
all_features: matches!(
932932
self.data.checkOnSave_features.as_ref().unwrap_or(&self.data.cargo_features),
933933
CargoFeatures::All

0 commit comments

Comments
 (0)