about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-04-17 17:56:29 +0000
committerbors <bors@rust-lang.org>2017-04-17 17:56:29 +0000
commit5516bcc4588ea6192298b4e3682eb1d09581912a (patch)
tree9b392d0f56be959b8b36d24e645c6ed5150d867c /src/libsyntax/parse/parser.rs
parent011f240b898899644039bae4933ee8bd03efd609 (diff)
parent07c6295137753cb2a060d53e04b688dac3ced751 (diff)
downloadrust-5516bcc4588ea6192298b4e3682eb1d09581912a.tar.gz
rust-5516bcc4588ea6192298b4e3682eb1d09581912a.zip
Auto merge of #41345 - frewsxcv:rollup, r=frewsxcv
Rollup of 3 pull requests

- Successful merges: #41012, #41280, #41290
- Failed merges:
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index ab4ac6f1b91..3e71c0f0f68 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -5056,7 +5056,9 @@ impl<'a> Parser<'a> {
     /// and `pub(super)` for `pub(in super)`.  If the following element can't be a tuple (i.e. it's
     /// a function definition, it's not a tuple struct field) and the contents within the parens
     /// isn't valid, emit a proper diagnostic.
-    fn parse_visibility(&mut self, can_take_tuple: bool) -> PResult<'a, Visibility> {
+    pub fn parse_visibility(&mut self, can_take_tuple: bool) -> PResult<'a, Visibility> {
+        maybe_whole!(self, NtVis, |x| x);
+
         if !self.eat_keyword(keywords::Pub) {
             return Ok(Visibility::Inherited)
         }