Skip to content

rustfmt adds trailing spaces to macro rules #5882

Closed
@matthiaskrgr

Description

@matthiaskrgr
macro_rules! foo {}
foo::bar!();

rustfmt --check

Diff in /home/matthias/vcs/github/rust/src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0062_mod_contents.rs at line 1:
-macro_rules! foo {}
+macro_rules! foo {
+
+}
 foo::bar!();

error[internal]: left behind trailing whitespace
 --> /home/matthias/vcs/github/rust/src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0062_mod_contents.rs:2:2:1
  |
2 |
  | ^^^^
  |

warning: rustfmt has failed to format. See previous 1 errors.

rustfmt 1.6.0-nightly (f88a8b7 2023-08-08)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions