Rustfmt: Rustfmt adds extra semicolon after type_macro invocation

Created on 20 Dec 2017  路  2Comments  路  Source: rust-lang/rustfmt

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.

a-macros bug

All 2 comments

This is similar to #2290. Once https://github.com/rust-lang/rust/pull/46835 gets merged this will be fixed by rustup update nightly && cargo install --force rustfmt-nightly.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Jerald picture Jerald  路  4Comments

torkleyy picture torkleyy  路  5Comments

ozkriff picture ozkriff  路  4Comments

gnzlbg picture gnzlbg  路  3Comments

cramertj picture cramertj  路  4Comments