I have a Rust project that depends on string_cache, which requires nightly. However, the latest version of nightly is refusing to compile due to deprecated features:
$ cargo build
Compiling string_cache v0.1.0 (https://github.com/servo/string-cache#45f19068)
/home/wilfred/.multirust/toolchains/nightly/cargo/git/checkouts/string-cache-efa5c30b1d5a962c/master/src/atom/mod.rs:65:21: 65:37 error: use of deprecated item: use `String::from` instead, #[deny(deprecated)] on by default
/home/wilfred/.multirust/toolchains/nightly/cargo/git/checkouts/string-cache-efa5c30b1d5a962c/master/src/atom/mod.rs:65 string: String::from_str(string_to_add),
^~~~~~~~~~~~~~~~
error: aborting due to previous error
Could not compile `string_cache`.
To learn more, run the command again with --verbose.
How do I compile string_cache? I've tried adding
#![allow(deprecated)]
to my main.rs, but that doesn't change the behaviour.
The compiler doesn't impose any restrictions on the usage of deprecated methods by default:
Compiles, but has the warning:
Your error message helps point to the culprit:
You'll have to figure out where the
deny
is specified.