File tree 2 files changed +4
-2
lines changed
compiler/rustc_parse/src/parser
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1014,7 +1014,8 @@ impl<'a> Parser<'a> {
1014
1014
/// If the following element can't be a tuple (i.e., it's a function definition), then
1015
1015
/// it's not a tuple struct field), and the contents within the parentheses isn't valid,
1016
1016
/// so emit a proper diagnostic.
1017
- pub ( crate ) fn parse_visibility ( & mut self , fbt : FollowedByType ) -> PResult < ' a , Visibility > {
1017
+ // Public for rustfmt usage.
1018
+ pub fn parse_visibility ( & mut self , fbt : FollowedByType ) -> PResult < ' a , Visibility > {
1018
1019
maybe_whole ! ( self , NtVis , |x| x) ;
1019
1020
1020
1021
self . expected_tokens . push ( TokenType :: Keyword ( kw:: Crate ) ) ;
Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ use std::mem;
21
21
impl < ' a > Parser < ' a > {
22
22
/// Parses a statement. This stops just before trailing semicolons on everything but items.
23
23
/// e.g., a `StmtKind::Semi` parses to a `StmtKind::Expr`, leaving the trailing `;` unconsumed.
24
- pub ( super ) fn parse_stmt ( & mut self ) -> PResult < ' a , Option < Stmt > > {
24
+ // Public for rustfmt usage.
25
+ pub fn parse_stmt ( & mut self ) -> PResult < ' a , Option < Stmt > > {
25
26
Ok ( self . parse_stmt_without_recovery ( ) . unwrap_or_else ( |mut e| {
26
27
e. emit ( ) ;
27
28
self . recover_stmt_ ( SemiColonMode :: Break , BlockMode :: Ignore ) ;
You can’t perform that action at this time.
0 commit comments