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:
commit
28c9fdafc0
2 changed files with 21 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue