Skip to content

Commit d45ef7d

Browse files
committed
Fix a span bug for binops
Mirrors rust-lang/rust#29807
1 parent a26e399 commit d45ef7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

syntex_syntax/src/parse/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2674,9 +2674,9 @@ impl<'a> Parser<'a> {
26742674
// Semi-statement forms are odd. See https://github.com/rust-lang/rust/issues/29071
26752675
return Ok(lhs);
26762676
}
2677-
let cur_op_span = self.span;
26782677
self.expected_tokens.push(TokenType::Operator);
26792678
while let Some(op) = AssocOp::from_token(&self.token) {
2679+
let cur_op_span = self.span;
26802680
let restrictions = if op.is_assign_like() {
26812681
self.restrictions & RESTRICTION_NO_STRUCT_LITERAL
26822682
} else {

0 commit comments

Comments
 (0)