-
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
Some fixes for error recovery in the compiler #32435
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Travis failed.
|
// Expand to cover the entire delimited token tree | ||
let span = Span { hi: close_span.hi, ..pre_span }; | ||
|
||
match self.token { |
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.
is this code specific to macros? if so, I don't see any tests below that would exercise it.
if let Some(&(_, sp)) = self.open_braces.last() { | ||
err.span_note(sp, "unclosed delimiter"); | ||
}; | ||
err.emit(); |
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.
I feel like once we emit one unclosed delimeter error, we should try to avoid reporting any further ones, since all further delimeters are pretty suspect.
@eddyb tells me that we parse all things as token trees first -- I didn't realize that! Disregard my comments, will re-review. |
|
Oops, totally ran that with the wrong branch. The output is:
|
@bors r+ |
📌 Commit 180d6b5 has been approved by |
Seems good to me. :) |
Some fixes for error recovery in the compiler
Some fixes for error recovery in the compiler
No description provided.