-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Fix invalid silencing of parsing error #123223
Conversation
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.
So it turns out that this still ICEs:
macro_rules! a {
( ) => {
impl<'b> c for f'f {}
};
}
fn main() {}
Specifically, this ICE example above suggests that having an exhaustive list of tokens to disable this behavior (self.last_lifetime = None;
) is fragile.
I think the right solution is to not delay a bug at all for this class of errors. If the redundancy is too noisy, we should instead be using diagnostic stashing to actually ensure that at least one error is emitted.
@rustbot author |
Beginning to think that the right solution is just to revert ea1883d -- suppressing the prefix error seems nice in theory, but perhaps not worth the complication of getting it right. Curious what @fmease thinks, since he suggested this. |
fine by me 👍 totally missed that this was so fragile during my review, we probably shouldn't keep patching this like that |
@compiler-errors yeah, I agree. I spend some time last night trying to come up with counter examples or alternative approcaches, but it got late enough that I convinced myself that removing the delay was likely the best thing to do. |
This comment has been minimized.
This comment has been minimized.
Given ```rust macro_rules! a { ( ) => { impl<'b> c for d { e::<f'g> } }; } ``` ensure an error is emitted. Fix rust-lang#123079.
@bors r+ rollup |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#123204 (rustdoc: point at span in `include_str!`-ed md file) - rust-lang#123223 (Fix invalid silencing of parsing error) - rust-lang#123249 (do not add prolog for variadic naked functions) - rust-lang#123825 (Call the panic hook for non-unwind panics in proc-macros) - rust-lang#123833 (Update stdarch submodule) - rust-lang#123841 (Improve diagnostic by suggesting to remove visibility qualifier) - rust-lang#123849 (Update E0384.md) - rust-lang#123852 (fix typo in library/std/src/lib.rs) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#123223 - estebank:issue-123079, r=pnkfelix Fix invalid silencing of parsing error Given ```rust macro_rules! a { ( ) => { impl<'b> c for d { e::<f'g> } }; } ``` ensure an error is emitted. Fix rust-lang#123079.
Given
ensure an error is emitted.
Fix #123079.