about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/stmt.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-12-02 18:36:36 +0000
committerbors <bors@rust-lang.org>2024-12-02 18:36:36 +0000
commitd49be02cf6d2e2a01264fcdef1e20c826710c0f5 (patch)
tree873ce3d38ea75bfa910a38eab39e6d834c13ca17 /compiler/rustc_parse/src/parser/stmt.rs
parent32eea2f4460b06b12acc98050a4211b8c0ccfd67 (diff)
parent586591f4d6f656fc2eaf98f33f248bac2b1c3e4f (diff)
downloadrust-d49be02cf6d2e2a01264fcdef1e20c826710c0f5.tar.gz
rust-d49be02cf6d2e2a01264fcdef1e20c826710c0f5.zip
Auto merge of #133760 - GuillaumeGomez:rollup-2c1y8c3, r=GuillaumeGomez
Rollup of 13 pull requests

Successful merges:

 - #133603 (Eliminate magic numbers from expression precedence)
 - #133715 (rustdoc-json: Include safety of `static`s)
 - #133721 (rustdoc-json: Add test for `impl Trait for dyn Trait`)
 - #133725 (Remove `//@ compare-output-lines-by-subset`)
 - #133730 (Add pretty-printer parenthesis insertion test)
 - #133736 (Add `needs-target-has-atomic` directive)
 - #133739 (Re-add myself to rotation)
 - #133743 (Fix docs for `<[T]>::as_array`.)
 - #133744 (Fix typo README.md)
 - #133745 (Remove static HashSet for default IDs list)
 - #133749 (mir validator: don't store mir phase)
 - #133751 (remove `Ty::is_copy_modulo_regions`)
 - #133757 (`impl Default for EarlyDiagCtxt`)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser/stmt.rs')
-rw-r--r--compiler/rustc_parse/src/parser/stmt.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/stmt.rs b/compiler/rustc_parse/src/parser/stmt.rs
index 190cd9ed061..5fa2e01fc86 100644
--- a/compiler/rustc_parse/src/parser/stmt.rs
+++ b/compiler/rustc_parse/src/parser/stmt.rs
@@ -1,5 +1,6 @@
 use std::borrow::Cow;
 use std::mem;
+use std::ops::Bound;
 
 use ast::Label;
 use rustc_ast as ast;
@@ -207,7 +208,7 @@ impl<'a> Parser<'a> {
             // Perform this outside of the `collect_tokens` closure, since our
             // outer attributes do not apply to this part of the expression.
             let (expr, _) = self.with_res(Restrictions::STMT_EXPR, |this| {
-                this.parse_expr_assoc_rest_with(0, true, expr)
+                this.parse_expr_assoc_rest_with(Bound::Unbounded, true, expr)
             })?;
             Ok(self.mk_stmt(lo.to(self.prev_token.span), StmtKind::Expr(expr)))
         } else {
@@ -240,7 +241,7 @@ impl<'a> Parser<'a> {
             let e = self.mk_expr(lo.to(hi), ExprKind::MacCall(mac));
             let e = self.maybe_recover_from_bad_qpath(e)?;
             let e = self.parse_expr_dot_or_call_with(attrs, e, lo)?;
-            let (e, _) = self.parse_expr_assoc_rest_with(0, false, e)?;
+            let (e, _) = self.parse_expr_assoc_rest_with(Bound::Unbounded, false, e)?;
             StmtKind::Expr(e)
         };
         Ok(self.mk_stmt(lo.to(hi), kind))