about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorAaron Turon <aturon@mozilla.com>2016-01-29 16:25:18 -0800
committerAaron Turon <aturon@mozilla.com>2016-03-14 15:04:39 -0700
commit9734406a5f95393e8e888cf67b48861ea8a39de7 (patch)
tree2b2789ffd67037fc80021d580733598fee8b1394 /src/libsyntax/parse
parentc1df41e776c5a65ce8345d34a7e22296a99abd5e (diff)
downloadrust-9734406a5f95393e8e888cf67b48861ea8a39de7.tar.gz
rust-9734406a5f95393e8e888cf67b48861ea8a39de7.zip
Assorted fixed after rebasing
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 969d39056aa..6839f11cd70 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -654,12 +654,12 @@ impl<'a> Parser<'a> {
         }
     }
 
-    pub fn eat_contextual_keyword(&mut self, ident: Ident) -> PResult<bool> {
+    pub fn eat_contextual_keyword(&mut self, ident: Ident) -> bool {
         if self.check_contextual_keyword(ident) {
-            try!(self.bump());
-            Ok(true)
+            self.bump();
+            true
         } else {
-            Ok(false)
+            false
         }
     }
 
@@ -5229,8 +5229,8 @@ impl<'a> Parser<'a> {
     }
 
     /// Parse defaultness: DEFAULT or nothing
-    fn parse_defaultness(&mut self) -> PResult<Defaultness> {
-        if try!(self.eat_contextual_keyword(special_idents::DEFAULT)) {
+    fn parse_defaultness(&mut self) -> PResult<'a, Defaultness> {
+        if self.eat_contextual_keyword(special_idents::DEFAULT) {
             Ok(Defaultness::Default)
         } else {
             Ok(Defaultness::Final)