cargo test --all-features
at the workspace level doesn't behave as I would expect
#15219
Labels
A-features
Area: features — conditional compilation
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
S-triage
Status: This issue is waiting on initial triage.
Problem
Let's say I have a request with two crates, a lib and a bin.
Cargo.toml
my_lib/Cargo.toml
my_lib/src/lib.rs
my_bin/Cargo.toml
my_bin/src/main.rs
Running
cargo check --all-features
at the workspace level I get:Meaning it's compiling the my_bin using my_lib with feature.feature_b enabled.
To me it seems like an error, as the my_bin crate doesn't ever specify the use of the
feature_b
feature, which is not enabled by default inmy_lib
.Proposed Solution
The behavior I would expect is:
Notes
No response
The text was updated successfully, but these errors were encountered: