From 104963c539e538a89fff21c133692fc21dac3e64 Mon Sep 17 00:00:00 2001 From: Andrew Cann Date: Fri, 22 Jul 2016 13:50:04 +0800 Subject: Switch on TyEmpty Parse -> ! as FnConverging(!) Add AdjustEmptyToAny coercion to all ! expressions Some fixes --- src/libsyntax/parse/parser.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/libsyntax/parse') 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))) -- cgit 1.4.1-3-g733a5