Skip to content

Commit

Permalink
Rollup merge of rust-lang#56433 - yui-knk:update_comment_of_parse_vis…
Browse files Browse the repository at this point in the history
…ibility, r=petrochenkov

Add description about `crate` for parse_visibility's comment

This rule was introduced by rust-lang#45401.
  • Loading branch information
kennytm authored Dec 3, 2018
2 parents 52a4fc8 + 172ec72 commit a498a6d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a498a6d

Please sign in to comment.