File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
compiler/rustc_borrowck/src/region_infer Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ use crate::type_check::{Locations, MirTypeckRegionConstraints};
36
36
use crate :: universal_regions:: { RegionClassification , UniversalRegions } ;
37
37
use crate :: { BorrowCheckRootCtxt , BorrowckInferCtxt , BorrowckState } ;
38
38
39
- #[ allow( unused) ] // TODO
40
39
pub ( crate ) enum DeferredOpaqueTypeError < ' tcx > {
41
40
UnexpectedHiddenRegion {
42
41
/// The opaque type.
@@ -593,7 +592,7 @@ fn apply_defining_uses<'tcx>(
593
592
} ) ;
594
593
595
594
let locations = Locations :: All ( hidden_type. span ) ;
596
- fully_perform_op_raw (
595
+ if let Err ( guar ) = fully_perform_op_raw (
597
596
infcx,
598
597
body,
599
598
universal_regions,
@@ -614,8 +613,9 @@ fn apply_defining_uses<'tcx>(
614
613
} ,
615
614
"equating opaque types" ,
616
615
) ,
617
- )
618
- . expect ( "failed to relate opaque types" ) ;
616
+ ) {
617
+ root_cx. add_concrete_opaque_type ( key. def_id , OpaqueHiddenType :: new_error ( tcx, guar) ) ;
618
+ }
619
619
}
620
620
}
621
621
You can’t perform that action at this time.
0 commit comments