-
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
Fix ICE: check if snippet is )
#108298
Fix ICE: check if snippet is )
#108298
Conversation
r? @jackh726 (rustbot has picked a reviewer for you, use r? to override) |
Is the parser logic incorrect, or is the suggestion logic incorrect? In the latter, we should just check that the span is adequate before emitting the suggestion, shouldn't we? More generally, I wonder if the diagnostic infra should just drop suggestions that satisfy this ICE. |
@cjgillot I think the parser logic causes this problem. In the following case,
However, we can check that just before emitting the suggestion. fn f() {a(b:&, |
r? @cjgillot |
Yes please. I consider each use of In that code path, which one is the "empty" span that the ICE designates? |
@bors r+ |
Rollup of 6 pull requests Successful merges: - rust-lang#108298 (Fix ICE: check if snippet is `)`) - rust-lang#108405 (Lazily compute crate name for consider_optimizing) - rust-lang#108656 (Rustdoc search: Emit an error for unclosed generic) - rust-lang#108660 (Remove ne implementations from strings) - rust-lang#108669 (Allow checking whether a type allows being uninitialized) - rust-lang#108727 (rustc_expand: make proc-macro derive error translatable) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #107705