diff options
| author | bors <bors@rust-lang.org> | 2024-12-21 06:41:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-12-21 06:41:22 +0000 |
| commit | 6076beecb8e875286ba68d491627cb0c04e3d459 (patch) | |
| tree | f9d50fc9d229807d35112a7f0a6a9337f2efdfe8 /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 73c278fd936c8eab4c8c6c6cb638da091b1e6740 (diff) | |
| parent | ea8bc3b4bee0e4ea2cdef8e24de0a531f2e785a7 (diff) | |
| download | rust-6076beecb8e875286ba68d491627cb0c04e3d459.tar.gz rust-6076beecb8e875286ba68d491627cb0c04e3d459.zip | |
Auto merge of #134605 - jhpratt:rollup-quiss71, r=jhpratt
Rollup of 7 pull requests Successful merges: - #133087 (Detect missing `.` in method chain in `let` bindings and statements) - #134575 (Handle `DropKind::ForLint` in coroutines correctly) - #134576 (Improve prose around basic examples of Iter and IterMut) - #134577 (Improve prose around `as_slice` example of Iter) - #134579 (Improve prose around into_slice example of IterMut) - #134593 (Less unwrap() in documentation) - #134600 (Fix parenthesization of chained comparisons by pretty-printer) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 12 |
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)) |
