@@ -3,12 +3,15 @@ use rustc_hir::def_id::DefId;
33use rustc_macros:: { StableHash , TyDecodable , TyEncodable , extension} ;
44use rustc_span:: { DUMMY_SP , ErrorGuaranteed , Symbol , kw, sym} ;
55pub use rustc_type_ir:: RegionVid ;
6- use rustc_type_ir:: { Region as IrRegion , RegionKind as IrRegionKind } ;
6+ use rustc_type_ir:: {
7+ LateParamRegion as IrLateParamRegion , Region as IrRegion , RegionKind as IrRegionKind ,
8+ } ;
79
810use crate :: ty:: { self , BoundVar , TyCtxt } ;
911
1012pub type Region < ' tcx > = IrRegion < TyCtxt < ' tcx > > ;
1113pub type RegionKind < ' tcx > = IrRegionKind < TyCtxt < ' tcx > > ;
14+ pub type LateParamRegion < ' tcx > = IrLateParamRegion < TyCtxt < ' tcx > > ;
1215
1316#[ extension( pub trait RegionExt <' tcx>) ]
1417impl < ' tcx > Region < ' tcx > {
@@ -170,21 +173,6 @@ impl std::fmt::Debug for EarlyParamRegion {
170173 }
171174}
172175
173- #[ derive( Clone , PartialEq , Eq , Hash , TyEncodable , TyDecodable , Copy ) ]
174- #[ derive( StableHash ) ]
175- /// The parameter representation of late-bound function parameters, "some region
176- /// at least as big as the scope `fr.scope`".
177- ///
178- /// Similar to a placeholder region as we create `LateParam` regions when entering a binder
179- /// except they are always in the root universe and instead of using a boundvar to distinguish
180- /// between others we use the `DefId` of the parameter. For this reason the `bound_region` field
181- /// should basically always be `BoundRegionKind::Named` as otherwise there is no way of telling
182- /// different parameters apart.
183- pub struct LateParamRegion {
184- pub scope : DefId ,
185- pub kind : LateParamRegionKind ,
186- }
187-
188176/// When liberating bound regions, we map their [`ty::BoundRegionKind`]
189177/// to this as we need to track the index of anonymous regions. We
190178/// otherwise end up liberating multiple bound regions to the same
0 commit comments