Skip to content

Commit a498a6d

Browse files
authored
Rollup merge of rust-lang#56433 - yui-knk:update_comment_of_parse_visibility, r=petrochenkov
Add description about `crate` for parse_visibility's comment This rule was introduced by rust-lang#45401.
2 parents 52a4fc8 + 172ec72 commit a498a6d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/libsyntax/parse/parser.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -6280,9 +6280,10 @@ impl<'a> Parser<'a> {
62806280
self.parse_single_struct_field(lo, vis, attrs)
62816281
}
62826282

6283-
/// Parse `pub`, `pub(crate)` and `pub(in path)` plus shortcuts `pub(self)` for `pub(in self)`
6284-
/// and `pub(super)` for `pub(in super)`. If the following element can't be a tuple (i.e. it's
6285-
/// a function definition, it's not a tuple struct field) and the contents within the parens
6283+
/// Parse `pub`, `pub(crate)` and `pub(in path)` plus shortcuts `crate` for `pub(crate)`,
6284+
/// `pub(self)` for `pub(in self)` and `pub(super)` for `pub(in super)`.
6285+
/// If the following element can't be a tuple (i.e. it's a function definition,
6286+
/// it's not a tuple struct field) and the contents within the parens
62866287
/// isn't valid, emit a proper diagnostic.
62876288
pub fn parse_visibility(&mut self, can_take_tuple: bool) -> PResult<'a, Visibility> {
62886289
maybe_whole!(self, NtVis, |x| x);

0 commit comments

Comments
 (0)