Skip to content

perpetually increasing indentation #6161

Open
@programmerjake

Description

@programmerjake

trying to format the following code increases the indentation by one level on some of it, every time rustfmt is run, it increases the indentation another level. by running rustfmt repeatedly, I was able to produce line widths of more than 1000.

https://play.rust-lang.org/?version=stable&mode=release&edition=2021&gist=8c150c886832e90a4543a2d3a794d4a6

macro_rules! my_macro {
    ($($tt:tt)*) => {};
}

fn f() {
    my_macro! {
        m =>
        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa": r"bbbbbbbbbbbbbbbbbbbbbb
                        cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
",
    };
}

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