File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
compiler/rustc_hir_analysis/src/collect/type_of Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -371,14 +371,8 @@ impl RpitConstraintChecker<'_> {
371
371
// Use borrowck to get the type with unerased regions.
372
372
let concrete_opaque_types = & self . tcx . mir_borrowck ( def_id) . concrete_opaque_types ;
373
373
debug ! ( ?concrete_opaque_types) ;
374
- for ( & def_id, & concrete_type) in concrete_opaque_types {
375
- if def_id != self . def_id {
376
- // Ignore constraints for other opaque types.
377
- continue ;
378
- }
379
-
374
+ if let Some ( & concrete_type) = concrete_opaque_types. get ( & self . def_id ) {
380
375
debug ! ( ?concrete_type, "found constraint" ) ;
381
-
382
376
if concrete_type. ty != self . found . ty {
383
377
if let Ok ( d) = self . found . build_mismatch_error ( & concrete_type, self . tcx ) {
384
378
d. emit ( ) ;
You can’t perform that action at this time.
0 commit comments