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};
3636use crate :: universal_regions:: { RegionClassification , UniversalRegions } ;
3737use crate :: { BorrowCheckRootCtxt , BorrowckInferCtxt , BorrowckState } ;
3838
39- #[ allow( unused) ] // TODO
4039pub ( crate ) enum DeferredOpaqueTypeError < ' tcx > {
4140 UnexpectedHiddenRegion {
4241 /// The opaque type.
@@ -593,7 +592,7 @@ fn apply_defining_uses<'tcx>(
593592 } ) ;
594593
595594 let locations = Locations :: All ( hidden_type. span ) ;
596- fully_perform_op_raw (
595+ if let Err ( guar ) = fully_perform_op_raw (
597596 infcx,
598597 body,
599598 universal_regions,
@@ -614,8 +613,9 @@ fn apply_defining_uses<'tcx>(
614613 } ,
615614 "equating opaque types" ,
616615 ) ,
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+ }
619619 }
620620}
621621
You can’t perform that action at this time.
0 commit comments