diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-12-25 20:26:08 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-12-25 20:26:08 +0000 |
commit | 97f01396eda7eb3e6ec5056f3f72d98e5739f829 (patch) | |
tree | c6c12c56d09d06454f20b003f7b75b4a40227e3a /crates | |
parent | 24e552fadf92c8f1fdcdd459c2a77a5cc05558af (diff) | |
parent | 4ee3c5202e35cf84a9278ebc06eb8c6c2051fbdf (diff) |
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 <[email protected]>
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_project_model/src/cargo_workspace.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_project_model/src/cargo_workspace.rs b/crates/ra_project_model/src/cargo_workspace.rs index c862d3912..1b3c246c7 100644 --- a/crates/ra_project_model/src/cargo_workspace.rs +++ b/crates/ra_project_model/src/cargo_workspace.rs | |||
@@ -165,7 +165,7 @@ impl CargoWorkspace { | |||
165 | // FIXME: `NoDefaultFeatures` is mutual exclusive with `SomeFeatures` | 165 | // FIXME: `NoDefaultFeatures` is mutual exclusive with `SomeFeatures` |
166 | // https://github.com/oli-obk/cargo_metadata/issues/79 | 166 | // https://github.com/oli-obk/cargo_metadata/issues/79 |
167 | meta.features(CargoOpt::NoDefaultFeatures); | 167 | meta.features(CargoOpt::NoDefaultFeatures); |
168 | } else { | 168 | } else if cargo_features.features.len() > 0 { |
169 | meta.features(CargoOpt::SomeFeatures(cargo_features.features.clone())); | 169 | meta.features(CargoOpt::SomeFeatures(cargo_features.features.clone())); |
170 | } | 170 | } |
171 | if let Some(parent) = cargo_toml.parent() { | 171 | if let Some(parent) = cargo_toml.parent() { |