Skip to content

snapshots sometimes leak inference variables #122188

Open
@lcnr

Description

@lcnr

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

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.T-typesRelevant to the types team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions