about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/expr.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-12-27 09:09:21 +0000
committerGitHub <noreply@github.com>2024-12-27 09:09:21 +0000
commit3623dfd42b9a32a8ce7bbfe8141b574c4584afea (patch)
tree64c299b6a279f2af55696a73fbe3d58813e343db /compiler/rustc_parse/src/parser/expr.rs
parent60e3bf4374f39d09b039734c94ef8f17d84b40e3 (diff)
parent96cfa5f2fd9e0d7c1d5b59687d3918d38710a0a3 (diff)
downloadrust-3623dfd42b9a32a8ce7bbfe8141b574c4584afea.tar.gz
rust-3623dfd42b9a32a8ce7bbfe8141b574c4584afea.zip
Merge pull request #4111 from rust-lang/rustup-2024-12-27
Automatic Rustup
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs12
1 files changed, 2 insertions, 10 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs
index 2f4adf2af9e..7533e75ffe2 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -279,13 +279,9 @@ impl<'a> Parser<'a> {
                 break;
             }
 
-            let fixity = op.fixity();
-            let min_prec = match fixity {
+            let min_prec = match op.fixity() {
                 Fixity::Right => Bound::Included(prec),
-                Fixity::Left => Bound::Excluded(prec),
-                // We currently have no non-associative operators that are not handled above by
-                // the special cases. The code is here only for future convenience.
-                Fixity::None => Bound::Excluded(prec),
+                Fixity::Left | Fixity::None => Bound::Excluded(prec),
             };
             let (rhs, _) = self.with_res(restrictions - Restrictions::STMT_EXPR, |this| {
                 let attrs = this.parse_outer_attributes()?;
@@ -337,10 +333,6 @@ impl<'a> Parser<'a> {
                     self.dcx().span_bug(span, "AssocOp should have been handled by special case")
                 }
             };
-
-            if let Fixity::None = fixity {
-                break;
-            }
         }
 
         Ok((lhs, parsed_something))