We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
parser.commit_stmt_expecting()
1 parent ea0dc92 commit a9d25f8Copy full SHA for a9d25f8
src/libsyntax/parse/parser.rs
@@ -553,10 +553,6 @@ impl<'a> Parser<'a> {
553
self.expect_one_of(edible, inedible)
554
}
555
556
- pub fn commit_stmt_expecting(&mut self, edible: token::Token) -> PResult<'a, ()> {
557
- self.commit_stmt(&[edible], &[])
558
- }
559
-
560
/// returns the span of expr, if it was not interpolated or the span of the interpolated token
561
fn interpolated_or_expr_span(&self,
562
expr: PResult<'a, P<Expr>>)
@@ -4122,7 +4118,7 @@ impl<'a> Parser<'a> {
4122
4118
_ => { // all other kinds of statements:
4123
4119
let mut hi = span.hi;
4124
4120
if classify::stmt_ends_with_semi(&node) {
4125
- self.commit_stmt_expecting(token::Semi)?;
4121
+ self.commit_stmt(&[token::Semi], &[])?;
4126
hi = self.last_span.hi;
4127
4128
0 commit comments