-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
> cargo new foo && cd foo
Created binary (application) `foo` package
> cargo add --vers 0.4.2 hex --no-default-features
Updating 'https://github.com/rust-lang/crates.io-index' index
Adding hex v0.4.2 to dependencies
> echo 'fn main() { dbg!(hex::encode(b"1234")); }' > src/main.rs
> cargo update --precise 0.4.2 -p hex
Updating crates.io index
Updating hex v0.4.3 -> v0.4.2
> cargo run
Compiling hex v0.4.2
Compiling foo v0.1.0 (/tmp/tmp.EwT6eRV1y2/foo)
Finished dev [unoptimized + debuginfo] target(s) in 0.51s
Running `/home/nemo157/.cargo/shared-target/debug/foo`
[src/main.rs:1] hex::encode(b"1234") = "31323334"
> cargo update -p hex
Updating crates.io index
Updating hex v0.4.2 -> v0.4.3
> cargo run
Compiling foo v0.1.0 (/tmp/tmp.EwT6eRV1y2/foo)
error[E0425]: cannot find function `encode` in crate `hex`
--> src/main.rs:1:23
|
1 | fn main() { dbg!(hex::encode(b"1234")); }
| ^^^^^^ not found in `hex`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0425`.
error: could not compile `foo`
To learn more, run the command again with --verbose.Moving an existing API under a feature flag is a breaking change to all users with default-features = false specified.
Reactions are currently unavailable