diff options
Diffstat (limited to 'crates/libsyntax2/src/grammar/items')
-rw-r--r-- | crates/libsyntax2/src/grammar/items/mod.rs | 2 | ||||
-rw-r--r-- | crates/libsyntax2/src/grammar/items/structs.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/libsyntax2/src/grammar/items/mod.rs b/crates/libsyntax2/src/grammar/items/mod.rs index 84cb47748..c74266133 100644 --- a/crates/libsyntax2/src/grammar/items/mod.rs +++ b/crates/libsyntax2/src/grammar/items/mod.rs | |||
@@ -63,7 +63,7 @@ pub(super) enum MaybeItem { | |||
63 | 63 | ||
64 | pub(super) fn maybe_item(p: &mut Parser, flavor: ItemFlavor) -> MaybeItem { | 64 | pub(super) fn maybe_item(p: &mut Parser, flavor: ItemFlavor) -> MaybeItem { |
65 | attributes::outer_attributes(p); | 65 | attributes::outer_attributes(p); |
66 | visibility(p); | 66 | opt_visibility(p); |
67 | if let Some(kind) = items_without_modifiers(p) { | 67 | if let Some(kind) = items_without_modifiers(p) { |
68 | return MaybeItem::Item(kind); | 68 | return MaybeItem::Item(kind); |
69 | } | 69 | } |
diff --git a/crates/libsyntax2/src/grammar/items/structs.rs b/crates/libsyntax2/src/grammar/items/structs.rs index 41bd2a4e0..b3ed94fe3 100644 --- a/crates/libsyntax2/src/grammar/items/structs.rs +++ b/crates/libsyntax2/src/grammar/items/structs.rs | |||
@@ -91,7 +91,7 @@ fn named_fields(p: &mut Parser) { | |||
91 | // pub uri: Uri, | 91 | // pub uri: Uri, |
92 | // } | 92 | // } |
93 | attributes::outer_attributes(p); | 93 | attributes::outer_attributes(p); |
94 | visibility(p); | 94 | opt_visibility(p); |
95 | if p.at(IDENT) { | 95 | if p.at(IDENT) { |
96 | name(p); | 96 | name(p); |
97 | p.expect(COLON); | 97 | p.expect(COLON); |
@@ -110,7 +110,7 @@ fn pos_fields(p: &mut Parser) { | |||
110 | } | 110 | } |
111 | while !p.at(R_PAREN) && !p.at(EOF) { | 111 | while !p.at(R_PAREN) && !p.at(EOF) { |
112 | let pos_field = p.start(); | 112 | let pos_field = p.start(); |
113 | visibility(p); | 113 | opt_visibility(p); |
114 | types::type_(p); | 114 | types::type_(p); |
115 | pos_field.complete(p, POS_FIELD); | 115 | pos_field.complete(p, POS_FIELD); |
116 | 116 | ||