diff options
| author | Andrew Cann <shum@canndrew.org> | 2016-07-22 13:50:04 +0800 |
|---|---|---|
| committer | Andrew Cann <shum@canndrew.org> | 2016-08-13 21:37:09 +0800 |
| commit | 104963c539e538a89fff21c133692fc21dac3e64 (patch) | |
| tree | 47f0eb74a863f329732f74914c7951fecd0d1260 /src/libsyntax/parse | |
| parent | 9f9f8567eb4effe1052b7458c7451f62d1dcc0b1 (diff) | |
| download | rust-104963c539e538a89fff21c133692fc21dac3e64.tar.gz rust-104963c539e538a89fff21c133692fc21dac3e64.zip | |
Switch on TyEmpty
Parse -> ! as FnConverging(!) Add AdjustEmptyToAny coercion to all ! expressions Some fixes
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index e3803591295..4f54f529322 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1332,11 +1332,7 @@ impl<'a> Parser<'a> { /// Parse optional return type [ -> TY ] in function decl pub fn parse_ret_ty(&mut self) -> PResult<'a, FunctionRetTy> { if self.eat(&token::RArrow) { - if self.eat(&token::Not) { - Ok(FunctionRetTy::None(self.last_span)) - } else { - Ok(FunctionRetTy::Ty(self.parse_ty()?)) - } + Ok(FunctionRetTy::Ty(self.parse_ty()?)) } else { let pos = self.span.lo; Ok(FunctionRetTy::Default(mk_sp(pos, pos))) |
