]> git.lizzy.rs Git - rust.git/commit - library/std/src/os/fd/raw.rs
Rollup merge of #99818 - aliemjay:fix-closure-normalize, r=jackh726
authorMichael Howell <michael@notriddle.com>
Sun, 9 Oct 2022 01:14:59 +0000 (18:14 -0700)
committerGitHub <noreply@github.com>
Sun, 9 Oct 2022 01:14:59 +0000 (18:14 -0700)
commitbf37054b1ff25e42c077e5b52c6dc492125d8f91
tree34a39d7ff4ea1c6cd2265cbb2f71b870ab75103c
parentf382c2748aec2ada91eff88840c996644ff0f70d
parentfc3d7eb91dcea2f77a51368681dd2674b232a426
Rollup merge of #99818 - aliemjay:fix-closure-normalize, r=jackh726

don't ICE when normalizing closure input tys

We were ICEing while rendering diagnostics because `universe_causes` is expected to track every universe created in the typeck's infcx.

`normalize_and_add_constraints` doesn't update `universe_causes`
when creating new universes, causing an ICE. Remove it!

Add spans to better track normalization constraints.

Fix couple places where `universe_causes` is not updated correctly to
track newly added universes.

Fixes #102800

~Fixess #99665~ (UPDATE: no longer true; the issue has a different failure path than when this PR was created and should be fixed by #101708, but the changes in this PR are still correct and should prevent potential future ICEs)
compiler/rustc_borrowck/src/type_check/free_region_relations.rs
compiler/rustc_borrowck/src/type_check/mod.rs