Skip to content

Rustfmt breaks macros due to changes #4631

Closed as not planned
Closed as not planned
@alexkazik

Description

@alexkazik

Describe the bug

The contents of macros are changed.

Input:

test_macro!(pub fn test_fn(); "foobar");

Output:

test_macro!(fn test_fn();, "foobar");

Expected behavior

Unchanged, or "formatted" but not keywords/symbols removed/added.

Meta

  • rustfmt version: rustfmt 1.4.30-nightly (acd9486 2020-12-20)
  • From where did you install rustfmt?: rustup
  • How do you run rustfmt: cargo fmt --all

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-macrosbugPanic, non-idempotency, invalid code, etc.duplicate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions