## Keyboard shortcuts

Press `←` or `→` to navigate between chapters

Press `S` or `/` to search in the book

Press `?` to show this help

Press `Esc` to hide this help

# Error code E0466

#### Note: this error code is no longer emitted by the compiler.

Macro import declaration was malformed.

Erroneous code examples:

    #![allow(unused)]
    fn main() {
    #[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:

    // 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.