@@ -1111,13 +1111,13 @@ pub type CanonicalPolyFnSig<'tcx> = Canonical<'tcx, Binder<FnSig<'tcx>>>;
1111
1111
#[ derive( Clone , Copy , PartialEq , Eq , PartialOrd , Ord ,
1112
1112
Hash , RustcEncodable , RustcDecodable , HashStable ) ]
1113
1113
pub struct ParamTy {
1114
- pub idx : u32 ,
1114
+ pub index : u32 ,
1115
1115
pub name : InternedString ,
1116
1116
}
1117
1117
1118
1118
impl < ' a , ' gcx , ' tcx > ParamTy {
1119
1119
pub fn new ( index : u32 , name : InternedString ) -> ParamTy {
1120
- ParamTy { idx : index, name : name }
1120
+ ParamTy { index, name : name }
1121
1121
}
1122
1122
1123
1123
pub fn for_self ( ) -> ParamTy {
@@ -1129,14 +1129,14 @@ impl<'a, 'gcx, 'tcx> ParamTy {
1129
1129
}
1130
1130
1131
1131
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 )
1133
1133
}
1134
1134
1135
1135
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,
1137
1137
// but this should only be possible when using `-Z continue-parse-after-error` like
1138
1138
// `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
1140
1140
}
1141
1141
}
1142
1142
@@ -1763,7 +1763,7 @@ impl<'a, 'gcx, 'tcx> TyS<'tcx> {
1763
1763
1764
1764
pub fn is_param ( & self , index : u32 ) -> bool {
1765
1765
match self . sty {
1766
- ty:: Param ( ref data) => data. idx == index,
1766
+ ty:: Param ( ref data) => data. index == index,
1767
1767
_ => false ,
1768
1768
}
1769
1769
}
0 commit comments