File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
src/librustc_parse/parser Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -23,15 +23,11 @@ impl<'a> Parser<'a> {
23
23
/// Parses a statement. This stops just before trailing semicolons on everything but items.
24
24
/// e.g., a `StmtKind::Semi` parses to a `StmtKind::Expr`, leaving the trailing `;` unconsumed.
25
25
pub fn parse_stmt ( & mut self ) -> PResult < ' a , Option < Stmt > > {
26
- Ok ( self . parse_stmt_ ( true ) )
27
- }
28
-
29
- fn parse_stmt_ ( & mut self , macro_legacy_warnings : bool ) -> Option < Stmt > {
30
- self . parse_stmt_without_recovery ( macro_legacy_warnings) . unwrap_or_else ( |mut e| {
26
+ Ok ( self . parse_stmt_without_recovery ( true ) . unwrap_or_else ( |mut e| {
31
27
e. emit ( ) ;
32
28
self . recover_stmt_ ( SemiColonMode :: Break , BlockMode :: Ignore ) ;
33
29
None
34
- } )
30
+ } ) )
35
31
}
36
32
37
33
fn parse_stmt_without_recovery (
You can’t perform that action at this time.
0 commit comments