]> git.lizzy.rs Git - rust.git/commit
Auto merge of #85755 - b-naber:unexpected_concrete_region, r=nikomatsakis
authorbors <bors@rust-lang.org>
Thu, 17 Jun 2021 12:31:56 +0000 (12:31 +0000)
committerbors <bors@rust-lang.org>
Thu, 17 Jun 2021 12:31:56 +0000 (12:31 +0000)
commit0ef2b4a29bf70e8984d0d2febb7a546856c554a0
treea0572025f0b52531d684fae0549921a0add58bff
parentb17d9c1332693fc386f5374f0d63aae0ce5abab5
parent09eed2889a2b959e35b6bed30ca4f53cc5a3e578
Auto merge of #85755 - b-naber:unexpected_concrete_region, r=nikomatsakis

Replace parent substs of associated types with inference vars in borrow checker

Fixes https://github.com/rust-lang/rust/issues/83190
Fixes https://github.com/rust-lang/rust/issues/78450

When we normalize an associated type that refers to an opaque type, it can happen that the substs of the associated type do not occur in the projection (they are parent substs). We previously didn't replace those substs with inference vars, which left a concrete region after all regions should have already been replaced with inference vars and triggered a `delay_span_bug`. After we normalize the opaque type, we now try to replace any remaining concrete regions with inference vars.
compiler/rustc_mir/src/borrow_check/region_infer/opaque_types.rs