@@ -156,7 +156,7 @@ pub enum SelfMode {
156
156
}
157
157
158
158
pub struct field_ty {
159
- ident : Ident ,
159
+ name : Name ,
160
160
id : DefId ,
161
161
vis : ast:: visibility ,
162
162
}
@@ -1757,7 +1757,7 @@ fn type_is_newtype_immediate(cx: ctxt, ty: t) -> bool {
1757
1757
ty_struct( def_id, ref substs) => {
1758
1758
let fields = struct_fields ( cx, def_id, substs) ;
1759
1759
fields. len ( ) == 1 &&
1760
- fields[ 0 ] . ident == token:: special_idents:: unnamed_field &&
1760
+ fields[ 0 ] . ident . name == token:: special_idents:: unnamed_field. name &&
1761
1761
type_is_immediate ( cx, fields[ 0 ] . mt . ty )
1762
1762
}
1763
1763
_ => false
@@ -4227,15 +4227,15 @@ fn struct_field_tys(fields: &[@struct_field]) -> ~[field_ty] {
4227
4227
match field. node . kind {
4228
4228
named_field( ident, visibility) => {
4229
4229
field_ty {
4230
- ident : ident,
4230
+ name : ident. name ,
4231
4231
id : ast_util:: local_def ( field. node . id ) ,
4232
4232
vis : visibility,
4233
4233
}
4234
4234
}
4235
4235
unnamed_field => {
4236
4236
field_ty {
4237
- ident :
4238
- syntax:: parse:: token:: special_idents:: unnamed_field,
4237
+ name :
4238
+ syntax:: parse:: token:: special_idents:: unnamed_field. name ,
4239
4239
id : ast_util:: local_def ( field. node . id ) ,
4240
4240
vis : ast:: public,
4241
4241
}
@@ -4250,7 +4250,8 @@ pub fn struct_fields(cx: ctxt, did: ast::DefId, substs: &substs)
4250
4250
-> ~[ field ] {
4251
4251
do lookup_struct_fields ( cx, did) . map |f| {
4252
4252
field {
4253
- ident : f. ident ,
4253
+ // FIXME #6993: change type of field to Name and get rid of new()
4254
+ ident : ast:: Ident :: new ( f. name ) ,
4254
4255
mt : mt {
4255
4256
ty : lookup_field_type ( cx, did, f. id , substs) ,
4256
4257
mutbl : MutImmutable
0 commit comments