about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorJeffrey Seyfried <jeffrey.seyfried@gmail.com>2016-06-29 06:40:05 +0000
committerJeffrey Seyfried <jeffrey.seyfried@gmail.com>2016-06-29 06:40:05 +0000
commita9d25f8b5936bc5477c8318fa4ddd315a2df55b5 (patch)
treed7fdfde240f3e7a3206db0cac5acdeb1cb02ddb8 /src/libsyntax
parentea0dc9297283daff6486807f43e190b4eb561412 (diff)
downloadrust-a9d25f8b5936bc5477c8318fa4ddd315a2df55b5.tar.gz
rust-a9d25f8b5936bc5477c8318fa4ddd315a2df55b5.zip
Refactor away `parser.commit_stmt_expecting()`
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/parse/parser.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 813d90103b8..20a54228d01 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -553,10 +553,6 @@ impl<'a> Parser<'a> {
         self.expect_one_of(edible, inedible)
     }
 
-    pub fn commit_stmt_expecting(&mut self, edible: token::Token) -> PResult<'a, ()> {
-        self.commit_stmt(&[edible], &[])
-    }
-
     /// returns the span of expr, if it was not interpolated or the span of the interpolated token
     fn interpolated_or_expr_span(&self,
                                  expr: PResult<'a, P<Expr>>)
@@ -4122,7 +4118,7 @@ impl<'a> Parser<'a> {
                 _ => { // all other kinds of statements:
                     let mut hi = span.hi;
                     if classify::stmt_ends_with_semi(&node) {
-                        self.commit_stmt_expecting(token::Semi)?;
+                        self.commit_stmt(&[token::Semi], &[])?;
                         hi = self.last_span.hi;
                     }