From 05e4116af2e015ebafcfb18b3db21c25ef9c7c99 Mon Sep 17 00:00:00 2001 From: Marcus Klaas Date: Sun, 3 Apr 2016 22:30:21 +0200 Subject: Fix the span for try shorthand expressions --- src/libsyntax/parse/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 9027a5b1074..f4a42684965 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2576,7 +2576,7 @@ impl<'a> Parser<'a> { loop { // expr? while self.eat(&token::Question) { - let hi = self.span.hi; + let hi = self.last_span.hi; e = self.mk_expr(lo, hi, ExprKind::Try(e), None); } -- cgit 1.4.1-3-g733a5