required-features implicit binaries for test does not check for dep syntax #7853
Labels
A-features
Area: features — conditional compilation
A-required-features
Area: required-features setting
C-bug
Category: bug
Problem
A project with a binary with
required-features = ["dep_name/feature_name"]
will only build the binary when the given dependency's feature is enabled. This feature syntax is not checked when the binary is built as an implicit dependency of an integration test, and thus the binary will not get built duringcargo test --features dep_name/feature_name
when I think it should.Steps
The following patch updates one of Cargo's tests to exercise this case.
Possible Solution(s)
The implicit binary check is done here. This does not check for the extended feature syntax, which is normally done here. Ideally the code for checking required-features should be shared.
Notes
cargo 1.42.0-nightly (f6449ba 2020-01-21)
The text was updated successfully, but these errors were encountered: