about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-11-12 23:48:56 +0000
committerbors <bors@rust-lang.org>2015-11-12 23:48:56 +0000
commitd5fde83ae7ec0d9ff7ebbcb9391a1d71a81a3f1d (patch)
tree25c0dcaafa28e8492e46fa70557c4b2fc89b7ea1 /src/libsyntax/parse
parent5a872880bd42f5fc56a3ae35aa05a4e239f5bd35 (diff)
parent224c789ef26cea705d299cc160073879ad1be2b3 (diff)
downloadrust-d5fde83ae7ec0d9ff7ebbcb9391a1d71a81a3f1d.tar.gz
rust-d5fde83ae7ec0d9ff7ebbcb9391a1d71a81a3f1d.zip
Auto merge of #29807 - nrc:op_span, r=brson
cc @nagisa
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 9219f05d99a..eb17c26b0c3 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -2699,9 +2699,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 {