@@ -6,9 +6,7 @@ use rustc_hir::def_id::DefId;
66use rustc_span:: symbol:: { kw, Symbol } ;
77use rustc_span:: Span ;
88
9- use super :: {
10- Clause , InstantiatedPredicates , ParamConst , ParamTy , RegionParameterDefinition , Ty , TyCtxt ,
11- } ;
9+ use super :: { Clause , InstantiatedPredicates , ParamConst , ParamTy , Ty , TyCtxt } ;
1210
1311#[ derive( Clone , Debug , TyEncodable , TyDecodable , HashStable ) ]
1412pub enum GenericParamDefKind {
@@ -64,13 +62,9 @@ pub struct GenericParamDef {
6462}
6563
6664impl GenericParamDef {
67- pub fn to_early_bound_region_data ( & self ) -> ty:: RegionParameterDefinition {
65+ pub fn to_early_bound_region_data ( & self ) -> ty:: EarlyParamRegion {
6866 if let GenericParamDefKind :: Lifetime = self . kind {
69- ty:: RegionParameterDefinition {
70- def_id : self . def_id ,
71- index : self . index ,
72- name : self . name ,
73- }
67+ ty:: EarlyParamRegion { def_id : self . def_id , index : self . index , name : self . name }
7468 } else {
7569 bug ! ( "cannot convert a non-lifetime parameter def to an early bound region" )
7670 }
@@ -266,10 +260,10 @@ impl<'tcx> Generics {
266260 }
267261 }
268262
269- /// Returns the `GenericParamDef` associated with this `RegionParameterDefinition `.
263+ /// Returns the `GenericParamDef` associated with this `EarlyParamRegion `.
270264 pub fn region_param (
271265 & ' tcx self ,
272- param : & RegionParameterDefinition ,
266+ param : & ty :: EarlyParamRegion ,
273267 tcx : TyCtxt < ' tcx > ,
274268 ) -> & ' tcx GenericParamDef {
275269 let param = self . param_at ( param. index as usize , tcx) ;
0 commit comments