File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
compiler/rustc_trait_selection/src/solve Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -241,6 +241,17 @@ where
241
241
242
242
match certainty {
243
243
Certainty :: Yes => {
244
+ // Goals may depend on structural identity. Region uniquification at the
245
+ // start of MIR borrowck may cause things to no longer be so, potentially
246
+ // causing an ICE.
247
+ //
248
+ // While we uniquify root goals in HIR this does not handle cases where
249
+ // regions are hidden inside of a type or const inference variable.
250
+ //
251
+ // FIXME(-Znext-solver): This does not handle inference variables hidden
252
+ // inside of an opaque type, e.g. if there's `Opaque = (?x, ?x)` in the
253
+ // storage, we can also rely on structural identity of `?x` even if we
254
+ // later uniquify it in MIR borrowck.
244
255
if infcx. in_hir_typeck && obligation. has_non_region_infer ( ) {
245
256
infcx. push_hir_typeck_potentially_region_dependent_goal ( obligation) ;
246
257
}
You can’t perform that action at this time.
0 commit comments