Skip to content

Commit 224c789

Browse files
committed
Fix a bad span for binops
1 parent 098ea17 commit 224c789

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libsyntax/parse/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2681,9 +2681,9 @@ impl<'a> Parser<'a> {
26812681
// Semi-statement forms are odd. See https://github.com/rust-lang/rust/issues/29071
26822682
return Ok(lhs);
26832683
}
2684-
let cur_op_span = self.span;
26852684
self.expected_tokens.push(TokenType::Operator);
26862685
while let Some(op) = AssocOp::from_token(&self.token) {
2686+
let cur_op_span = self.span;
26872687
let restrictions = if op.is_assign_like() {
26882688
self.restrictions & Restrictions::RESTRICTION_NO_STRUCT_LITERAL
26892689
} else {

0 commit comments

Comments
 (0)