@@ -11,8 +11,8 @@ use rustc_macros::extension;
1111use rustc_middle:: mir:: { Body , ConstraintCategory } ;
1212use rustc_middle:: ty:: {
1313 self , DefiningScopeKind , DefinitionSiteHiddenType , FallibleTypeFolder , GenericArg ,
14- GenericArgsRef , OpaqueHiddenType , OpaqueTypeKey , Region , RegionVid , Ty , TyCtxt , TypeFoldable ,
15- TypeSuperFoldable , TypeVisitableExt , fold_regions,
14+ GenericArgsRef , OpaqueTypeKey , ProvisionalHiddenType , Region , RegionVid , Ty , TyCtxt ,
15+ TypeFoldable , TypeSuperFoldable , TypeVisitableExt , fold_regions,
1616} ;
1717use rustc_mir_dataflow:: points:: DenseLocationMap ;
1818use rustc_span:: Span ;
@@ -48,7 +48,7 @@ pub(crate) enum DeferredOpaqueTypeError<'tcx> {
4848 /// The opaque type.
4949 opaque_type_key : OpaqueTypeKey < ' tcx > ,
5050 /// The hidden type containing the member region.
51- hidden_type : OpaqueHiddenType < ' tcx > ,
51+ hidden_type : ProvisionalHiddenType < ' tcx > ,
5252 /// The unexpected region.
5353 member_region : Region < ' tcx > ,
5454 } ,
@@ -67,7 +67,7 @@ pub(crate) fn clone_and_resolve_opaque_types<'tcx>(
6767 infcx : & BorrowckInferCtxt < ' tcx > ,
6868 universal_region_relations : & Frozen < UniversalRegionRelations < ' tcx > > ,
6969 constraints : & mut MirTypeckRegionConstraints < ' tcx > ,
70- ) -> ( OpaqueTypeStorageEntries , Vec < ( OpaqueTypeKey < ' tcx > , OpaqueHiddenType < ' tcx > ) > ) {
70+ ) -> ( OpaqueTypeStorageEntries , Vec < ( OpaqueTypeKey < ' tcx > , ProvisionalHiddenType < ' tcx > ) > ) {
7171 let opaque_types = infcx. clone_opaque_types ( ) ;
7272 let opaque_types_storage_num_entries = infcx. inner . borrow_mut ( ) . opaque_types ( ) . num_entries ( ) ;
7373 let opaque_types = opaque_types
@@ -161,7 +161,7 @@ struct DefiningUse<'tcx> {
161161 /// to interact with code outside of `rustc_borrowck`.
162162 opaque_type_key : OpaqueTypeKey < ' tcx > ,
163163 arg_regions : Vec < RegionVid > ,
164- hidden_type : OpaqueHiddenType < ' tcx > ,
164+ hidden_type : ProvisionalHiddenType < ' tcx > ,
165165}
166166
167167/// This computes the actual hidden types of the opaque types and maps them to their
@@ -181,7 +181,7 @@ pub(crate) fn compute_definition_site_hidden_types<'tcx>(
181181 constraints : & MirTypeckRegionConstraints < ' tcx > ,
182182 location_map : Rc < DenseLocationMap > ,
183183 hidden_types : & mut FxIndexMap < LocalDefId , ty:: DefinitionSiteHiddenType < ' tcx > > ,
184- opaque_types : & [ ( OpaqueTypeKey < ' tcx > , OpaqueHiddenType < ' tcx > ) ] ,
184+ opaque_types : & [ ( OpaqueTypeKey < ' tcx > , ProvisionalHiddenType < ' tcx > ) ] ,
185185) -> Vec < DeferredOpaqueTypeError < ' tcx > > {
186186 let mut errors = Vec :: new ( ) ;
187187 // When computing the hidden type we need to track member constraints.
@@ -216,7 +216,7 @@ pub(crate) fn compute_definition_site_hidden_types<'tcx>(
216216fn collect_defining_uses < ' tcx > (
217217 rcx : & mut RegionCtxt < ' _ , ' tcx > ,
218218 hidden_types : & mut FxIndexMap < LocalDefId , ty:: DefinitionSiteHiddenType < ' tcx > > ,
219- opaque_types : & [ ( OpaqueTypeKey < ' tcx > , OpaqueHiddenType < ' tcx > ) ] ,
219+ opaque_types : & [ ( OpaqueTypeKey < ' tcx > , ProvisionalHiddenType < ' tcx > ) ] ,
220220 errors : & mut Vec < DeferredOpaqueTypeError < ' tcx > > ,
221221) -> Vec < DefiningUse < ' tcx > > {
222222 let infcx = rcx. infcx ;
@@ -302,7 +302,7 @@ fn compute_definition_site_hidden_types_from_defining_uses<'tcx>(
302302 hidden_type. span ,
303303 "opaque type with non-universal region args" ,
304304 ) ;
305- ty:: OpaqueHiddenType :: new_error ( tcx, guar)
305+ ty:: ProvisionalHiddenType :: new_error ( tcx, guar)
306306 }
307307 } ;
308308
@@ -489,7 +489,7 @@ pub(crate) fn apply_definition_site_hidden_types<'tcx>(
489489 known_type_outlives_obligations : & [ ty:: PolyTypeOutlivesPredicate < ' tcx > ] ,
490490 constraints : & mut MirTypeckRegionConstraints < ' tcx > ,
491491 hidden_types : & mut FxIndexMap < LocalDefId , ty:: DefinitionSiteHiddenType < ' tcx > > ,
492- opaque_types : & [ ( OpaqueTypeKey < ' tcx > , OpaqueHiddenType < ' tcx > ) ] ,
492+ opaque_types : & [ ( OpaqueTypeKey < ' tcx > , ProvisionalHiddenType < ' tcx > ) ] ,
493493) -> Vec < DeferredOpaqueTypeError < ' tcx > > {
494494 let tcx = infcx. tcx ;
495495 let mut errors = Vec :: new ( ) ;
@@ -679,7 +679,7 @@ impl<'tcx> InferCtxt<'tcx> {
679679 fn infer_opaque_definition_from_instantiation (
680680 & self ,
681681 opaque_type_key : OpaqueTypeKey < ' tcx > ,
682- instantiated_ty : OpaqueHiddenType < ' tcx > ,
682+ instantiated_ty : ProvisionalHiddenType < ' tcx > ,
683683 ) -> Result < ty:: DefinitionSiteHiddenType < ' tcx > , NonDefiningUseReason < ' tcx > > {
684684 opaque_type_has_defining_use_args (
685685 self ,
0 commit comments