@@ -244,7 +244,7 @@ pub type TyParamBounds = OwnedSlice<TyParamBound>;
244244
245245#[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , Hash , Debug ) ]
246246pub struct TyParam {
247- pub ident : Ident ,
247+ pub name : Name ,
248248 pub id : NodeId ,
249249 pub bounds : TyParamBounds ,
250250 pub default : Option < P < Ty > > ,
@@ -378,7 +378,7 @@ impl fmt::Debug for Pat {
378378#[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , Hash , Debug ) ]
379379pub struct FieldPat {
380380 /// The identifier for the field
381- pub ident : Ident ,
381+ pub name : Name ,
382382 /// The pattern the field is destructured to
383383 pub pat : P < Pat > ,
384384 pub is_shorthand : bool ,
@@ -791,7 +791,7 @@ pub enum ImplItem_ {
791791#[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , Hash , Debug ) ]
792792pub struct TypeBinding {
793793 pub id : NodeId ,
794- pub ident : Ident ,
794+ pub name : Name ,
795795 pub ty : P < Ty > ,
796796 pub span : Span ,
797797}
@@ -981,11 +981,11 @@ pub enum ExplicitSelf_ {
981981 /// No self
982982 SelfStatic ,
983983 /// `self`
984- SelfValue ( Ident ) ,
984+ SelfValue ( Name ) ,
985985 /// `&'lt self`, `&'lt mut self`
986- SelfRegion ( Option < Lifetime > , Mutability , Ident ) ,
986+ SelfRegion ( Option < Lifetime > , Mutability , Name ) ,
987987 /// `self: TYPE`
988- SelfExplicit ( P < Ty > , Ident ) ,
988+ SelfExplicit ( P < Ty > , Name ) ,
989989}
990990
991991pub type ExplicitSelf = Spanned < ExplicitSelf_ > ;
@@ -1026,7 +1026,7 @@ pub struct EnumDef {
10261026
10271027#[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , Hash , Debug ) ]
10281028pub struct Variant_ {
1029- pub name : Ident ,
1029+ pub name : Name ,
10301030 pub attrs : Vec < Attribute > ,
10311031 pub kind : VariantKind ,
10321032 pub id : NodeId ,
@@ -1133,9 +1133,9 @@ pub struct StructField_ {
11331133}
11341134
11351135impl StructField_ {
1136- pub fn ident ( & self ) -> Option < Ident > {
1136+ pub fn name ( & self ) -> Option < Name > {
11371137 match self . kind {
1138- NamedField ( ref ident , _) => Some ( ident . clone ( ) ) ,
1138+ NamedField ( name , _) => Some ( name ) ,
11391139 UnnamedField ( _) => None
11401140 }
11411141 }
@@ -1145,7 +1145,7 @@ pub type StructField = Spanned<StructField_>;
11451145
11461146#[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , Hash , Debug , Copy ) ]
11471147pub enum StructFieldKind {
1148- NamedField ( Ident , Visibility ) ,
1148+ NamedField ( Name , Visibility ) ,
11491149 /// Element of a tuple-like struct
11501150 UnnamedField ( Visibility ) ,
11511151}
0 commit comments