From 224c789ef26cea705d299cc160073879ad1be2b3 Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Fri, 13 Nov 2015 09:34:41 +1300 Subject: [PATCH] Fix a bad span for binops --- src/libsyntax/parse/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 1e38eebec5d6..db61feb41139 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2681,9 +2681,9 @@ impl<'a> Parser<'a> { // Semi-statement forms are odd. See https://github.com/rust-lang/rust/issues/29071 return Ok(lhs); } - let cur_op_span = self.span; self.expected_tokens.push(TokenType::Operator); while let Some(op) = AssocOp::from_token(&self.token) { + let cur_op_span = self.span; let restrictions = if op.is_assign_like() { self.restrictions & Restrictions::RESTRICTION_NO_STRUCT_LITERAL } else {