Skip to content

Commit 5181f99

Browse files
committed
Auto merge of #11168 - weihanglo:remove-Zfeatures, r=Eh2406
Remove lingering unstable flag `-Zfeatures` From [Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/.E2.9C.94.20-Zfeatures): > Eric Huss: When trying to validate that the feature resolver resolves features in the same way as the dependency resolver. I think it is identical, but there are a lot of complex use cases and flags that aren't covered in the testsuite so I'm not entirely confident. If we ever come across a scenario where it isn't the same, the compare option can be useful to see what differs. In the future we could pick 61b94c3 to remove this Z flag.
2 parents da6a8f0 + 3a6bea6 commit 5181f99

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/cargo/core/features.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -931,10 +931,13 @@ impl CliUnstable {
931931
"host-config" => self.host_config = parse_empty(k, v)?,
932932
"target-applies-to-host" => self.target_applies_to_host = parse_empty(k, v)?,
933933
"features" => {
934-
// For now this is still allowed (there are still some
935-
// unstable options like "compare"). This should be removed at
936-
// some point, and migrate to a new -Z flag for any future
937-
// things.
934+
// `-Z features` has been stabilized since 1.51,
935+
// but `-Z features=compare` is still allowed for convenience
936+
// to validate that the feature resolver resolves features
937+
// in the same way as the dependency resolver,
938+
// until we feel confident to remove entirely.
939+
//
940+
// See rust-lang/cargo#11168
938941
let feats = parse_features(v);
939942
let stab_is_not_empty = feats.iter().any(|feat| {
940943
matches!(

0 commit comments

Comments
 (0)