blob: 7aefedbc0875d7dc7412e3b11c25684beb89c96a [file] [log] [blame] [view]
Macro import declaration was malformed.
Erroneous code examples:
```compile_fail,E0466
#[macro_use(a_macro(another_macro))] // error: invalid import declaration
extern crate core as some_crate;
#[macro_use(i_want = "some_macros")] // error: invalid import declaration
extern crate core as another_crate;
```
This is a syntax error at the level of attribute declarations. The proper
syntax for macro imports is the following:
```ignore (cannot-doctest-multicrate-project)
// 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.