INVALID_MACRO_EXPORT_ARGUMENTS in rustc_lint_defs::builtin - Rust
Description: The `invalid_macro_export_arguments` lint detects cases where `#[macro_export]` is being used with invalid arguments.

Skip to main content

## INVALID_MACRO_EXPORT_ARGUMENTS

# Static INVALID_MACRO_EXPORT_ARGUMENTS

Source

    pub static INVALID_MACRO_EXPORT_ARGUMENTS: &Lint

Expand description

The `invalid_macro_export_arguments` lint detects cases where `#[macro_export]` is being used with invalid arguments.

#### §Example

ⓘ

    #![deny(invalid_macro_export_arguments)]

    #[macro_export(invalid_parameter)]
    macro_rules! myMacro {
       () => {
            // [...]
       }
    }

    #[macro_export(too, many, items)]

{{produces}}

#### §Explanation

The only valid argument is `#[macro_export(local_inner_macros)]` or no argument (`#[macro_export]`). You can’t have multiple arguments in a `#[macro_export(..)]`, or mention arguments other than `local_inner_macros`.