about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-12-03 18:07:18 +0800
committerGitHub <noreply@github.com>2018-12-03 18:07:18 +0800
commita498a6d198dcaa55281b1eb5acff3820ae5b9c1e (patch)
tree2d9f0b12ca5d81249795c887e6fd704e418fda63 /src/libsyntax/parse
parent52a4fc81300bef1d6c4a133a01aacfa91f736908 (diff)
parent172ec724af5013e9e9b2cf8f3bc12eda2db52876 (diff)
downloadrust-a498a6d198dcaa55281b1eb5acff3820ae5b9c1e.tar.gz
rust-a498a6d198dcaa55281b1eb5acff3820ae5b9c1e.zip
Rollup merge of #56433 - yui-knk:update_comment_of_parse_visibility, r=petrochenkov
Add description about `crate` for parse_visibility's comment

This rule was introduced by https://github.com/rust-lang/rust/pull/45401.
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 1970c17c619..1cd5006f330 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -6280,9 +6280,10 @@ impl<'a> Parser<'a> {
         self.parse_single_struct_field(lo, vis, attrs)
     }
 
-    /// Parse `pub`, `pub(crate)` and `pub(in path)` plus shortcuts `pub(self)` for `pub(in self)`
-    /// 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
+    /// Parse `pub`, `pub(crate)` and `pub(in path)` plus shortcuts `crate` for `pub(crate)`,
+    /// `pub(self)` for `pub(in self)` 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.
     pub fn parse_visibility(&mut self, can_take_tuple: bool) -> PResult<'a, Visibility> {
         maybe_whole!(self, NtVis, |x| x);