rustfmt icon indicating copy to clipboard operation
rustfmt copied to clipboard

perpetually increasing indentation

Open programmerjake opened this issue 1 year ago • 0 comments

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
",
    };
}

programmerjake avatar May 10 '24 07:05 programmerjake