File tree 1 file changed +3
-2
lines changed
compiler/rustc_typeck/src/check
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,8 @@ pub fn resolve_interior<'a, 'tcx>(
218
218
. filter_map ( |mut cause| {
219
219
// Erase regions and canonicalize late-bound regions to deduplicate as many types as we
220
220
// can.
221
- let erased = fcx. tcx . erase_regions ( cause. ty ) ;
221
+ let ty = fcx. normalize_associated_types_in ( cause. span , cause. ty ) ;
222
+ let erased = fcx. tcx . erase_regions ( ty) ;
222
223
if captured_tys. insert ( erased) {
223
224
// Replace all regions inside the generator interior with late bound regions.
224
225
// Note that each region slot in the types gets a new fresh late bound region,
@@ -263,7 +264,7 @@ pub fn resolve_interior<'a, 'tcx>(
263
264
// Unify the type variable inside the generator with the new witness
264
265
match fcx. at ( & fcx. misc ( body. value . span ) , fcx. param_env ) . eq ( interior, witness) {
265
266
Ok ( ok) => fcx. register_infer_ok_obligations ( ok) ,
266
- _ => bug ! ( ) ,
267
+ _ => bug ! ( "failed to relate {interior} and {witness}" ) ,
267
268
}
268
269
}
269
270
You can’t perform that action at this time.
0 commit comments