Skip to content

Declarative Macros 2.0 and Source Corruption #1949

Closed
@valff

Description

@valff

Declarative macros 2.0 were landed recently (rust-lang/rust#40847), and I want to try them. The problem is that rustfmt corrupts the source. Consider this simple example:

pub macro reg() {}

Rustfmt converts it to:

pubmacro reg() {}

Which makes it uncompilable. Version of rustfmt: 0.2.5-nightly.

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