]> git.lizzy.rs Git - rust.git/commit
Auto merge of #99814 - aliemjay:patch-2, r=jackh726
authorbors <bors@rust-lang.org>
Wed, 30 Nov 2022 14:03:36 +0000 (14:03 +0000)
committerbors <bors@rust-lang.org>
Wed, 30 Nov 2022 14:03:36 +0000 (14:03 +0000)
commit90711a86e5bdd4b0b65d293f0c2c48fd2db761b3
treed9d31fe9b8a07fb945a3c99170146c181ea72283
parent24606deaf48e56f604a6125fa11fb9f70cf4f1f4
parent70200ac1907812a0f2abb7e9534e2bc26ae9f103
Auto merge of #99814 - aliemjay:patch-2, r=jackh726

fix universe map in ifcx.instantiate_canonical_*

Previously, `infcx.instantiate_canonical_*` maps the root universe in `canonical` into `ty::UniverseIndex::Root`, I think because it assumes it works with a fresh `infcx` but this is not true for the use cases in mir typeck. Now the root universe is mapped into `infcx.universe()`.

I catched this accidentally while reviewing the code. I'm not sure if this is the right fix or if it is really a bug!
compiler/rustc_infer/src/infer/canonical/mod.rs