-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
macro expanding to nothing in match arm causes uninformative parse error #30128
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
C-bug
Category: This is a bug.
Comments
A further reduced case, probably the same problem: macro_rules! mac { () => () }
fn main(){ let a = mac!(); } Likely connected to #10951 as well. |
Mark-Simulacrum
added
the
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
label
May 10, 2017
Mark-Simulacrum
added
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
labels
Jul 24, 2017
Possibly related to #26288. |
CC #27569 |
CC #33953 |
kennytm
added a commit
to kennytm/rust
that referenced
this issue
Oct 26, 2018
Macro diagnostics tweaks Fix rust-lang#30128, fix rust-lang#10951 by adding an appropriate span to the diagnostic. Fix rust-lang#26288 by suggesting adding semicolon to macro call.
kennytm
added a commit
to kennytm/rust
that referenced
this issue
Oct 26, 2018
Macro diagnostics tweaks Fix rust-lang#30128, fix rust-lang#10951 by adding an appropriate span to the diagnostic. Fix rust-lang#26288 by suggesting adding semicolon to macro call.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
C-bug
Category: This is a bug.
Failing code:
The error is "unexpected token:
<eof>
" with a span of 1:1: 1:1.Workaround:
Expected: the failing code either compiles or at least gives an error pointing at the problem.
Found by mohawk on IRC.
The text was updated successfully, but these errors were encountered: