Skip to content

Commit 690815b

Browse files
committed
inline parse_stmt_ into parse_stmt
1 parent b75a93a commit 690815b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/librustc_parse/parser/stmt.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,11 @@ impl<'a> Parser<'a> {
2323
/// Parses a statement. This stops just before trailing semicolons on everything but items.
2424
/// e.g., a `StmtKind::Semi` parses to a `StmtKind::Expr`, leaving the trailing `;` unconsumed.
2525
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| {
3127
e.emit();
3228
self.recover_stmt_(SemiColonMode::Break, BlockMode::Ignore);
3329
None
34-
})
30+
}))
3531
}
3632

3733
fn parse_stmt_without_recovery(

0 commit comments

Comments
 (0)