From dd64a155e9dd24fd2a81f8c634fdb396632de472 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 24 Aug 2018 00:16:29 +0300 Subject: rename --- crates/libsyntax2/src/grammar/items/mod.rs | 2 +- crates/libsyntax2/src/grammar/items/structs.rs | 4 ++-- crates/libsyntax2/src/grammar/mod.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/libsyntax2/src') 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 { pub(super) fn maybe_item(p: &mut Parser, flavor: ItemFlavor) -> MaybeItem { attributes::outer_attributes(p); - visibility(p); + opt_visibility(p); if let Some(kind) = items_without_modifiers(p) { return MaybeItem::Item(kind); } 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) { // pub uri: Uri, // } attributes::outer_attributes(p); - visibility(p); + opt_visibility(p); if p.at(IDENT) { name(p); p.expect(COLON); @@ -110,7 +110,7 @@ fn pos_fields(p: &mut Parser) { } while !p.at(R_PAREN) && !p.at(EOF) { let pos_field = p.start(); - visibility(p); + opt_visibility(p); types::type_(p); pos_field.complete(p, POS_FIELD); 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 { fn is_block(self) -> bool { self == BlockLike::Block } } -fn visibility(p: &mut Parser) { +fn opt_visibility(p: &mut Parser) { match p.current() { PUB_KW => { let m = p.start(); -- cgit v1.2.3