@@ -1111,13 +1111,13 @@ pub type CanonicalPolyFnSig<'tcx> = Canonical<'tcx, Binder<FnSig<'tcx>>>;
11111111#[ derive( Clone , Copy , PartialEq , Eq , PartialOrd , Ord ,
11121112 Hash , RustcEncodable , RustcDecodable , HashStable ) ]
11131113pub struct ParamTy {
1114- pub idx : u32 ,
1114+ pub index : u32 ,
11151115 pub name : InternedString ,
11161116}
11171117
11181118impl < ' a , ' gcx , ' tcx > ParamTy {
11191119 pub fn new ( index : u32 , name : InternedString ) -> ParamTy {
1120- ParamTy { idx : index, name : name }
1120+ ParamTy { index, name : name }
11211121 }
11221122
11231123 pub fn for_self ( ) -> ParamTy {
@@ -1129,14 +1129,14 @@ impl<'a, 'gcx, 'tcx> ParamTy {
11291129 }
11301130
11311131 pub fn to_ty ( self , tcx : TyCtxt < ' a , ' gcx , ' tcx > ) -> Ty < ' tcx > {
1132- tcx. mk_ty_param ( self . idx , self . name )
1132+ tcx. mk_ty_param ( self . index , self . name )
11331133 }
11341134
11351135 pub fn is_self ( & self ) -> bool {
1136- // FIXME(#50125): Ignoring `Self` with `idx != 0` might lead to weird behavior elsewhere,
1136+ // FIXME(#50125): Ignoring `Self` with `index != 0` might lead to weird behavior elsewhere,
11371137 // but this should only be possible when using `-Z continue-parse-after-error` like
11381138 // `compile-fail/issue-36638.rs`.
1139- self . name == keywords:: SelfUpper . name ( ) . as_str ( ) && self . idx == 0
1139+ self . name == keywords:: SelfUpper . name ( ) . as_str ( ) && self . index == 0
11401140 }
11411141}
11421142
@@ -1763,7 +1763,7 @@ impl<'a, 'gcx, 'tcx> TyS<'tcx> {
17631763
17641764 pub fn is_param ( & self , index : u32 ) -> bool {
17651765 match self . sty {
1766- ty:: Param ( ref data) => data. idx == index,
1766+ ty:: Param ( ref data) => data. index == index,
17671767 _ => false ,
17681768 }
17691769 }
0 commit comments