-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Description
When using InferCtxt::probe/commit_if_ok
, we discard all inference variables created inside of this snapshot. This means that returning a type containing inference variables from it can later result in ICE if we try to access them.
This should not happen and we should protect ourselves from doing so in the future. cc https://rust-lang.zulipchat.com/#narrow/stream/144729-t-types/topic/leaking.20infer.20vars.20from.20snapshots
Metadata
Metadata
Assignees
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.