Open
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