You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a crate (let's call it greet) with a feature hello that is not enabled by default. I want to use this feature in my other crate (let's call it bug), but only when running tests. According to the cargo documentation this should be possible by using dev-dependencies.
However, I've noticed that features I enable in the dev-dependencies.greet block are also used when building my binary (e.g. cargo run or cargo build).
I'm using Rust 1.6.0 (but this was also happening in 1.5.0).
I have a crate (let's call it
greet
) with a featurehello
that is not enabled by default. I want to use this feature in my other crate (let's call itbug
), but only when running tests. According to the cargo documentation this should be possible by usingdev-dependencies
.However, I've noticed that features I enable in the
dev-dependencies.greet
block are also used when building my binary (e.g.cargo run
orcargo build
).I'm using Rust 1.6.0 (but this was also happening in 1.5.0).
The
greet
crate:The
bug
crate, using this previous crategreet
:The assert on
cargo test
passes, the one oncargo run
fails - even though I'm not enabling thehello
feature in mydependencies.greet
block.I'd expect both assertions to pass.
The text was updated successfully, but these errors were encountered: