-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Better errors with bad/missing identifiers in MBEs #118939
base: master
Are you sure you want to change the base?
Better errors with bad/missing identifiers in MBEs #118939
Conversation
r? @TaKO8Ki (rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
aeb58d5
to
a51902a
Compare
This comment has been minimized.
This comment has been minimized.
In #62258 |
a51902a
to
953a1ef
Compare
This comment has been minimized.
This comment has been minimized.
@EliseZeroTwo A test |
@rustbot author |
ee200da
to
3452e01
Compare
3452e01
to
661b30a
Compare
@rustbot label -S-waiting-on-author +S-waiting-on-review |
This comment has been minimized.
This comment has been minimized.
661b30a
to
db53e3f
Compare
This comment has been minimized.
This comment has been minimized.
@rustbot author |
db53e3f
to
4c4b155
Compare
This comment has been minimized.
This comment has been minimized.
4c4b155
to
7073fb9
Compare
@rustbot review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with one nit
7073fb9
to
3714817
Compare
This is a breaking language change, if I understand correctly. |
As documentation seems to indicate that this is how it is meant to be, I did not think it was. I took a look before submitting this and also could not find published software using this, but maybe testing the change against crates.io would be a good idea anyways? It does undo the change you implemented in #62258 which reallowed |
Well, not by me, at least. In any case, such changes should go through the language team. |
☔ The latest upstream changes (presumably #119146) made this pull request unmergeable. Please resolve the merge conflicts. |
I'll try to push this conversation forward by nominating for T-lang discussion, keeping in mind some raised concerns. @rustbot label I-lang-nominated |
This PR implements better error handling around identifiers in MBEs.
It is related to #118295 which is already closed, but it fixes up issues left present by the solution for that issue.
Improved errors:
Parenthesised Ident
Previously with the code:
The compiler would output the following, incorrect error:
Now it outputs:
Missing Ident
Previously with the code:
The compiler would output the following, incorrect error:
Now it outputs:
This will interfere with the
stderr
of the test case I introduced in #118928 that has not yet been merged, due to that test case requiring a (templated) parenthesised ident to be present.It includes regression tests.
🖤