aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src/grammar/items
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libsyntax2/src/grammar/items')
-rw-r--r--crates/libsyntax2/src/grammar/items/structs.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/crates/libsyntax2/src/grammar/items/structs.rs b/crates/libsyntax2/src/grammar/items/structs.rs
index 80e77edd3..41bd2a4e0 100644
--- a/crates/libsyntax2/src/grammar/items/structs.rs
+++ b/crates/libsyntax2/src/grammar/items/structs.rs
@@ -84,15 +84,21 @@ fn named_fields(p: &mut Parser) {
84 p.expect(R_CURLY); 84 p.expect(R_CURLY);
85 85
86 fn named_field(p: &mut Parser) { 86 fn named_field(p: &mut Parser) {
87 let field = p.start(); 87 let m = p.start();
88 // test field_attrs
89 // struct S {
90 // #[serde(with = "url_serde")]
91 // pub uri: Uri,
92 // }
93 attributes::outer_attributes(p);
88 visibility(p); 94 visibility(p);
89 if p.at(IDENT) { 95 if p.at(IDENT) {
90 name(p); 96 name(p);
91 p.expect(COLON); 97 p.expect(COLON);
92 types::type_(p); 98 types::type_(p);
93 field.complete(p, NAMED_FIELD); 99 m.complete(p, NAMED_FIELD);
94 } else { 100 } else {
95 field.abandon(p); 101 m.abandon(p);
96 p.err_and_bump("expected field declaration"); 102 p.err_and_bump("expected field declaration");
97 } 103 }
98 } 104 }