Skip to content

Commit

Permalink
Reduce predence of rhs of let-expr
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jan 20, 2022
1 parent 2468457 commit dd82fff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
6 changes: 5 additions & 1 deletion src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2112,7 +2112,11 @@ pub(crate) mod parsing {
let_token: input.parse()?,
pat: pat::parsing::multi_pat_with_leading_vert(input)?,
eq_token: input.parse()?,
expr: Box::new(input.call(Expr::parse_without_eager_brace)?),
expr: Box::new({
let allow_struct = AllowStruct(false);
let lhs = unary_expr(input, allow_struct)?;
parse_expr(input, lhs, allow_struct, Precedence::Compare)?
}),
})
}
}
Expand Down
8 changes: 0 additions & 8 deletions tests/repo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ const REVISION: &str = "5e57faa78aa7661c6000204591558f6665f11abc";

#[rustfmt::skip]
static EXCLUDE: &[&str] = &[
// TODO: let chains
"src/test/ui/expr/if/attrs/let-chains-attr.rs",
"src/test/ui/mir/mir_let_chains_drop_order.rs",
"src/test/ui/rfc-2497-if-let-chains/ast-lowering-does-not-wrap-let-chains.rs",
"src/test/ui/rfc-2497-if-let-chains/irrefutable-lets.rs",
"src/test/ui/rfc-2497-if-let-chains/issue-90722.rs",
"src/test/ui/rfc-2497-if-let-chains/then-else-blocks.rs",

// TODO: impl ~const T {}
// https://github.com/dtolnay/syn/issues/1051
"src/test/ui/rfc-2632-const-trait-impl/syntax.rs",
Expand Down

0 comments on commit dd82fff

Please sign in to comment.