@@ -156,7 +156,7 @@ pub enum SelfMode {
156156}
157157
158158pub struct field_ty {
159- ident : Ident ,
159+ name : Name ,
160160 id : DefId ,
161161 vis : ast:: visibility ,
162162}
@@ -1757,7 +1757,7 @@ fn type_is_newtype_immediate(cx: ctxt, ty: t) -> bool {
17571757 ty_struct( def_id, ref substs) => {
17581758 let fields = struct_fields ( cx, def_id, substs) ;
17591759 fields. len ( ) == 1 &&
1760- fields[ 0 ] . ident == token:: special_idents:: unnamed_field &&
1760+ fields[ 0 ] . ident . name == token:: special_idents:: unnamed_field. name &&
17611761 type_is_immediate ( cx, fields[ 0 ] . mt . ty )
17621762 }
17631763 _ => false
@@ -4227,15 +4227,15 @@ fn struct_field_tys(fields: &[@struct_field]) -> ~[field_ty] {
42274227 match field. node . kind {
42284228 named_field( ident, visibility) => {
42294229 field_ty {
4230- ident : ident,
4230+ name : ident. name ,
42314231 id : ast_util:: local_def ( field. node . id ) ,
42324232 vis : visibility,
42334233 }
42344234 }
42354235 unnamed_field => {
42364236 field_ty {
4237- ident :
4238- syntax:: parse:: token:: special_idents:: unnamed_field,
4237+ name :
4238+ syntax:: parse:: token:: special_idents:: unnamed_field. name ,
42394239 id : ast_util:: local_def ( field. node . id ) ,
42404240 vis : ast:: public,
42414241 }
@@ -4250,7 +4250,8 @@ pub fn struct_fields(cx: ctxt, did: ast::DefId, substs: &substs)
42504250 -> ~[ field ] {
42514251 do lookup_struct_fields ( cx, did) . map |f| {
42524252 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 ) ,
42544255 mt : mt {
42554256 ty : lookup_field_type ( cx, did, f. id , substs) ,
42564257 mutbl : MutImmutable
0 commit comments