1
Fork 0

Auto merge of #32711 - marcusklaas:try-shorthand-span-fix, r=nagisa

Fix the span for try shorthand expressions

My five character contribution to the rust parser! Fixes https://github.com/rust-lang/rust/issues/32709.
This commit is contained in:
bors 2016-04-11 22:14:04 -07:00
commit 28c9fdafc0
2 changed files with 21 additions and 1 deletions

View file

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