@@ -3238,7 +3238,7 @@ pub impl Parser {
3238
3238
is_tuple_like = false ;
3239
3239
fields = ~[ ] ;
3240
3240
while * self . token != token:: RBRACE {
3241
- match self . parse_class_item ( ) {
3241
+ match self . parse_struct_decl_field ( ) {
3242
3242
dtor_decl( ref blk, ref attrs, s) => {
3243
3243
match the_dtor {
3244
3244
Some ( ( _, _, s_first) ) => {
@@ -3355,7 +3355,8 @@ pub impl Parser {
3355
3355
dtor_decl ( body, attrs, mk_sp ( lo, self . last_span . hi ) )
3356
3356
}
3357
3357
3358
- fn parse_class_item ( & self ) -> class_contents {
3358
+ // parse an item in a struct definition
3359
+ fn parse_struct_decl_field ( & self ) -> class_contents {
3359
3360
3360
3361
if self . try_parse_obsolete_priv_section ( ) {
3361
3362
return members ( ~[ ] ) ;
@@ -3759,7 +3760,7 @@ pub impl Parser {
3759
3760
let mut the_dtor: Option < ( blk , ~[ attribute ] , codemap:: span ) > = None ;
3760
3761
let mut fields: ~[ @struct_field ] = ~[ ] ;
3761
3762
while * self . token != token:: RBRACE {
3762
- match self . parse_class_item ( ) {
3763
+ match self . parse_struct_decl_field ( ) {
3763
3764
dtor_decl( ref blk, ref attrs, s) => {
3764
3765
match the_dtor {
3765
3766
Some ( ( _, _, s_first) ) => {
0 commit comments