# Static rustc_lint::builtin::MISSING_FRAGMENT_SPECIFIER

source ·

    pub static MISSING_FRAGMENT_SPECIFIER: &'static Lint

Expand description

The `missing_fragment_specifier` lint is issued when an unused pattern in a `macro_rules!` macro definition has a meta-variable (e.g. `$e`) that is not followed by a fragment specifier (e.g. `:expr`).

This warning can always be fixed by removing the unused pattern in the `macro_rules!` macro definition.

#### §Example

ⓘ

    macro_rules! foo {
       () => {};
       ($name) => { };
    }

    fn main() {
       foo!();
    }

{{produces}}

#### §Explanation

To fix this, remove the unused pattern from the `macro_rules!` macro definition:

    macro_rules! foo {
        () => {};
    }
    fn main() {
        foo!();
    }