We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd4979a commit f3b5ec2Copy full SHA for f3b5ec2
src/libsyntax/parse/parser.rs
@@ -1799,7 +1799,7 @@ impl Parser {
1799
} else if self.eat_keyword(keywords::Self) {
1800
let path = ast_util::ident_to_path(mk_sp(lo, hi), special_idents::self_);
1801
ex = ExprPath(path);
1802
- hi = self.span.hi;
+ hi = self.last_span.hi;
1803
} else if self.eat_keyword(keywords::If) {
1804
return self.parse_if_expr();
1805
} else if self.eat_keyword(keywords::For) {
@@ -1934,7 +1934,7 @@ impl Parser {
1934
&[token::COMMA], &[token::RBRACE]);
1935
}
1936
1937
- hi = pth.span.hi;
+ hi = self.span.hi;
1938
self.expect(&token::RBRACE);
1939
ex = ExprStruct(pth, fields, base);
1940
return self.mk_expr(lo, hi, ex);
0 commit comments