We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fa91446 + 1f5dc55 commit 9434e7cCopy full SHA for 9434e7c
src/libsyntax/parse/parser.rs
@@ -2023,7 +2023,7 @@ impl Parser {
2023
seq_sep_trailing_disallowed(token::COMMA),
2024
|p| p.parse_expr()
2025
);
2026
- hi = self.span.hi;
+ hi = self.last_span.hi;
2027
2028
let nd = self.mk_call(e, es, NoSugar);
2029
e = self.mk_expr(lo, hi, nd);
@@ -2033,7 +2033,7 @@ impl Parser {
2033
token::LBRACKET => {
2034
self.bump();
2035
let ix = self.parse_expr();
2036
- hi = ix.span.hi;
+ hi = self.span.hi;
2037
self.commit_expr_expecting(ix, token::RBRACKET);
2038
let index = self.mk_index(e, ix);
2039
e = self.mk_expr(lo, hi, index)
0 commit comments