]> git.lizzy.rs Git - rust.git/commitdiff
Fix the span for ! returns
authorNick Cameron <ncameron@mozilla.com>
Thu, 17 Sep 2015 03:13:51 +0000 (15:13 +1200)
committerNick Cameron <ncameron@mozilla.com>
Thu, 17 Sep 2015 03:13:51 +0000 (15:13 +1200)
src/libsyntax/parse/parser.rs

index ff622859cf0b12e48b1d16f11f83c2a4436d63c8..b6650b6f944201a476ae8317b2a115136a6bad1c 100644 (file)
@@ -1263,7 +1263,7 @@ pub fn parse_mt(&mut self) -> PResult<MutTy> {
     pub fn parse_ret_ty(&mut self) -> PResult<FunctionRetTy> {
         if try!(self.eat(&token::RArrow) ){
             if try!(self.eat(&token::Not) ){
-                Ok(NoReturn(self.span))
+                Ok(NoReturn(self.last_span))
             } else {
                 Ok(Return(try!(self.parse_ty_nopanic())))
             }