Error code E0466
Macro import declaration was malformed.
Erroneous code examples:
ⓘ
This is a syntax error at the level of attribute declarations. The proper syntax for macro imports is the following:
// In some_crate:
#[macro_export]
macro_rules! get_tacos {
...
}
#[macro_export]
macro_rules! get_pimientos {
...
}
// In your crate:
#[macro_use(get_tacos, get_pimientos)] // It imports `get_tacos` and
extern crate some_crate; // `get_pimientos` macros from some_crate
If you would like to import all exported macros, write macro_use
with no
arguments.