Skip to content

Rustfmt adds extra semicolon after type_macro invocation #2294

Closed
@Marwes

Description

@Marwes

Before

macro_rules! test {
    ($($t: expr)*) => { i32 }
}

type Test = test!{
    123
};

After

macro_rules! test {
    ($($t: expr)*) => { i32 }
}

type Test = test!{
                123
            };;

This unfortunately breaks the code since ;; is invalid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-macrosbugPanic, non-idempotency, invalid code, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions