-
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
Do not ICE on malformed suggestion spans #68256
Conversation
The original report produces, the following, where we see we're already emitting an invalid span in the primary diagnostic window, but handling it gracefully there:
Fixing the syntax error in the original report produces reasonable spans:
The underlying issue is that we're taking a span from |
☔ The latest upstream changes (presumably #68272) made this pull request unmergeable. Please resolve the merge conflicts. |
07d8658
to
03240e1
Compare
@bors r+ |
📌 Commit 03240e1 has been approved by |
Do not ICE on malformed suggestion spans Under the assumption that suggestions are by their very nature always "best effort", it is ok if we don't display them instead of having an ICE. The underlying issue of the malformed span being _created_ is left unaddressed. Fix rust-lang#67567. r? @petrochenkov
Do not ICE on malformed suggestion spans Under the assumption that suggestions are by their very nature always "best effort", it is ok if we don't display them instead of having an ICE. The underlying issue of the malformed span being _created_ is left unaddressed. Fix rust-lang#67567. r? @petrochenkov
Rollup of 9 pull requests Successful merges: - #66660 (Don't warn about snake case for field puns.) - #68093 (Fix deref impl typedef) - #68204 (Use named fields for `{ast,hir}::ItemKind::Impl`) - #68256 (Do not ICE on malformed suggestion spans) - #68279 (Clean up E0198 explanation) - #68291 (Update sanitizer tests) - #68312 (Add regression test for integer literals in generic arguments in where clauses) - #68314 (Stop treating `FalseEdges` and `FalseUnwind` as having semantic value for const eval) - #68317 (Clean up E0199 explanation) Failed merges: r? @ghost
discussed at T-compiler meeting. approved for beta-backport. |
@estebank This PR does not backport to beta cleanly, and the set of merge conflicts. Can you prepare a commit that backports this onto origin/beta? |
Never mind. I forgot about the rustfmt changes on master, applying those to beta allowed this to backport cleanly atop them. |
[beta] backports This backports: * Do not ICE on malformed suggestion spans #68256 * Distinguish between private items and hidden items in rustdoc #67875 * Revert parts of #66405. #67471 It also includes a few formatting commits to permit the backports to proceed cleanly (those are scoped to the relevant files, but still generate noise, of course). This was deemed easier than attempting to manually deal with the formatting. r? @ghost
Do not ICE on multipart suggestions touching multiple files When encountering a multipart suggestion with spans belonging to different contexts, skip that suggestion. Fix rust-lang#68449. Similar to rust-lang#68256.
Under the assumption that suggestions are by their very nature always "best effort", it is ok if we don't display them instead of having an ICE. The underlying issue of the malformed span being created is left unaddressed.
Fix #67567.
r? @petrochenkov