diff options
| author | Aaron Turon <aturon@mozilla.com> | 2016-01-29 16:25:18 -0800 |
|---|---|---|
| committer | Aaron Turon <aturon@mozilla.com> | 2016-03-14 15:04:39 -0700 |
| commit | 9734406a5f95393e8e888cf67b48861ea8a39de7 (patch) | |
| tree | 2b2789ffd67037fc80021d580733598fee8b1394 /src/libsyntax/parse | |
| parent | c1df41e776c5a65ce8345d34a7e22296a99abd5e (diff) | |
| download | rust-9734406a5f95393e8e888cf67b48861ea8a39de7.tar.gz rust-9734406a5f95393e8e888cf67b48861ea8a39de7.zip | |
Assorted fixed after rebasing
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 12 |
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) |
