Keep feature behavior additive, idempotent and order independent
Choose a feature-combination test matrix instead of testing defaults only
Cargo unifies enabled features
When several dependency paths enable features on the same package, Cargo builds that package with their union. A feature therefore must not silently turn off behavior enabled by another feature; resolution is set union, not command-line order or last writer wins.
Additive does not mean every combination is automatically valid
Prefer features that can coexist. If two backends truly cannot coexist, split packages, select the active backend at runtime, or reject the combination explicitly at compile time. CI should exercise no-default, common single features, supported combinations and all-features where applicable.
CHECKPOINT
Two workspace members enable `rustls` and `native-tls` on the same dependency. Which statements match Cargo's feature contract?
Select every applicable option. Credit requires an exact set match.
ISOLATED RUST 1.96
src/lib.rsEDIT
02 / CODE REVIEW
Make the code safe
Repair `resolve_features` so it mirrors Cargo feature unification: core is always present, every requested capability is added, duplicates are idempotent, and order cannot change the result. Keep both TLS capabilities when both are requested.