mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-16 17:58:16 +00:00
Merge #2658
2658: Only add features flags if non-empty r=matklad a=edwin0cheng This prevent error when disabled `all-features` in a cargo workspace, because of `--features is not allowed in the root of a virtual workspace` when running `cargo metadata`. Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
This commit is contained in:
commit
97f01396ed
1 changed files with 1 additions and 1 deletions
|
@ -165,7 +165,7 @@ impl CargoWorkspace {
|
|||
// FIXME: `NoDefaultFeatures` is mutual exclusive with `SomeFeatures`
|
||||
// https://github.com/oli-obk/cargo_metadata/issues/79
|
||||
meta.features(CargoOpt::NoDefaultFeatures);
|
||||
} else {
|
||||
} else if cargo_features.features.len() > 0 {
|
||||
meta.features(CargoOpt::SomeFeatures(cargo_features.features.clone()));
|
||||
}
|
||||
if let Some(parent) = cargo_toml.parent() {
|
||||
|
|
Loading…
Reference in a new issue