Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declarative Macros 2.0 and Source Corruption #1949

Closed
valff opened this issue Sep 6, 2017 · 1 comment
Closed

Declarative Macros 2.0 and Source Corruption #1949

valff opened this issue Sep 6, 2017 · 1 comment
Labels
a-macros bug Panic, non-idempotency, invalid code, etc.

Comments

@valff
Copy link
Contributor

valff commented Sep 6, 2017

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.

@nrc nrc added the bug Panic, non-idempotency, invalid code, etc. label Sep 6, 2017
bors added a commit to rust-lang/rust that referenced this issue Sep 11, 2017
@topecongiro
Copy link
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
Labels
a-macros bug Panic, non-idempotency, invalid code, etc.
Projects
None yet
Development

No branches or pull requests

3 participants