aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/libsyntax2/src/grammar/items/mod.rs2
-rw-r--r--crates/libsyntax2/src/grammar/items/structs.rs4
-rw-r--r--crates/libsyntax2/src/grammar/mod.rs2
3 files changed, 4 insertions, 4 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
64pub(super) fn maybe_item(p: &mut Parser, flavor: ItemFlavor) -> MaybeItem { 64pub(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
diff --git a/crates/libsyntax2/src/grammar/mod.rs b/crates/libsyntax2/src/grammar/mod.rs
index d9443f24f..bbdc4f807 100644
--- a/crates/libsyntax2/src/grammar/mod.rs
+++ b/crates/libsyntax2/src/grammar/mod.rs
@@ -54,7 +54,7 @@ impl BlockLike {
54 fn is_block(self) -> bool { self == BlockLike::Block } 54 fn is_block(self) -> bool { self == BlockLike::Block }
55} 55}
56 56
57fn visibility(p: &mut Parser) { 57fn opt_visibility(p: &mut Parser) {
58 match p.current() { 58 match p.current() {
59 PUB_KW => { 59 PUB_KW => {
60 let m = p.start(); 60 let m = p.start();