Skip to content

rustfmt fails to format macro call after macro call with invalid syntax #1742

@topecongiro

Description

@topecongiro
fn main() {
    let json = json!({ "foo": "bar", });
    foo!( a );
}

In the above code snippet, rustfmt fails to parse json!({ "foo": "bar", }). After that, any macro call in the same file will not be formatted properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: macros (procedural macros, macro_rules! macros, etc.)I-poor-formattingIssue: poor formatting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions