-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Procedural macros stringify inputs with macro invocations too aggressively #50840
Labels
A-macros-1.2
Area: Declarative macros 1.2
A-macros-2.0
Area: Declarative macros 2.0 (#39412)
C-bug
Category: This is a bug.
Comments
The cause of this bug is described here |
A fix for this should be included with #50971 |
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
May 22, 2018
This commit updates the `Mac_` AST structure to keep track of the delimiters that it originally had for its invocation. This allows us to faithfully pretty-print macro invocations not using parentheses (e.g. `vec![...]`). This in turn helps procedural macros due to rust-lang#43081. Closes rust-lang#50840
alexcrichton
added
C-bug
Category: This is a bug.
A-macros-1.2
Area: Declarative macros 1.2
labels
May 22, 2018
bors
added a commit
that referenced
this issue
May 24, 2018
rustc: Correctly pretty-print macro delimiters This commit updates the `Mac_` AST structure to keep track of the delimiters that it originally had for its invocation. This allows us to faithfully pretty-print macro invocations not using parentheses (e.g. `vec![...]`). This in turn helps procedural macros due to #43081. Closes #50840
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-macros-1.2
Area: Declarative macros 1.2
A-macros-2.0
Area: Declarative macros 2.0 (#39412)
C-bug
Category: This is a bug.
Given this procedural macro:
and this invocation:
It generates:
Not a great error message!
If the delimiters on the macro are changed from
[]
to()
you get:A much better error message!
This issue is forked off #50700
The text was updated successfully, but these errors were encountered: