Fix the span for try shorthand expressions

This commit is contained in:
Marcus Klaas 2016-04-03 22:30:21 +02:00
parent c0b8c43820
commit 05e4116af2
2 changed files with 21 additions and 1 deletions

View file

@ -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);
}