Skip to content

Declarative Macros 2.0 and Source Corruption #1949

@valff

Description

@valff
Contributor

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.

Activity

added
bugPanic, non-idempotency, invalid code, etc.
on Sep 6, 2017
added a commit that references this issue on Sep 11, 2017
topecongiro

topecongiro commented on Sep 12, 2017

@topecongiro
Contributor

This is now fixed by using the latest nightly toolchain. Please run rustup update && cargo install rustfmt-nightly --force.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @nrc@valff@topecongiro

        Issue actions

          Declarative Macros 2.0 and Source Corruption · Issue #1949 · rust-lang/rustfmt