-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed as duplicate of#122188
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.Call for participation: Hard difficulty. Experience needed to fix: A lot.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
"snapshot vec: index out of bounds" errors happen if we leak inference variables from a
probe
/in the error of acommit_if_ok
.We create an inference variables inside of the snapshot, revert the snapshot, removing the infer var again, and then try to look it up in the
InferCtxt
which then causes this ICE. This is already an existing issue and a bunch of diagnostics are really brittle right now, ICEing if you look at them the wrong way. I'Ve tried to fix this in #122189 but didn't end up getting it over the finish line.
Originally posted by @lcnr in #142488
Given that this is such a frequent issue and makes working on diagnostics a more unpleasant than it should be, we should actually do a proper fix here.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.Call for participation: Hard difficulty. Experience needed to fix: A lot.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.