A plugin/crate was declared but cannot be found.
Erroneous code example:
#![feature(plugin)]
#![plugin(cookie_monster)] // error: can't find crate for `cookie_monster`
extern crate cake_is_a_lie; // error: can't find crate for `cake_is_a_lie`
RunYou need to link your code to the relevant crate in order to be able to use it
(through Cargo or the -L
option of rustc example). Plugins are crates as
well, and you link to them the same way.
[dependencies]
in Cargo.toml.package =
under [dependencies]
in Cargo.toml.std
or core
std
prepackaged.
Consider one of the following:
rustup target add
cargo build -Z build-std
#![no_std]
at the crate root, so you won’t need std
in the first
place.x.py build library/std
. More information
about x.py is available in the rustc-dev-guide.