Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uperror message for macro in wrong context is missing context #34421
Comments
This comment has been minimized.
This comment has been minimized.
|
cc me |
This comment has been minimized.
This comment has been minimized.
|
So this fell through the cracks, and was a stable to nightly/beta regression. It still is a regression, in a way, but only of diagnostics. @jseyfried Could you take a look? |
Mark-Simulacrum
added
the
A-diagnostics
label
May 6, 2017
This comment has been minimized.
This comment has been minimized.
|
Nominating for prioritization. |
This comment has been minimized.
This comment has been minimized.
|
So this part of the (previous) stable message:
feels like a bug to me anyhow. This part:
is sort of good. It'd be nice to preserve a backtrace, at least. And ideally we'd suggest adding a |
This comment has been minimized.
This comment has been minimized.
|
Given how much time has past, we're going to call this P-medium for now. However, @jseyfried will try to write up some mentoring instructions (or maybe fix it). He has a plan. =) triage: P-medium |
rust-highfive
added
P-medium
and removed
I-nominated
labels
May 11, 2017
jseyfried
self-assigned this
May 11, 2017
This comment has been minimized.
This comment has been minimized.
|
I think the best path forward here is to try parsing an expression macro expansion as a statement before emitting an error. If the macro expansion parses as a statement successfully, we can emit a more helpful error suggesting that the user add a semicolon to the macro invocation. |
jseyfried
added
E-medium
E-mentor
labels
May 15, 2017
Mark-Simulacrum
added
the
C-bug
label
Jul 25, 2017
This comment has been minimized.
This comment has been minimized.
|
I'm interested in this but I need informations to understand what to do :) |
durka commentedJun 23, 2016
•
edited
This is a regression from stable to beta and nightly.
This code is wrong (missing semicolons):
Stable prints:
Beta and nightly both print:
Notice that not only is all the useful information gone, but the compiler aborts after the first error instead of finding the rest. It does not matter whether
RUST_NEW_ERROR_FORMATis on or off.cc @nikomatsakis @jonathandturner