diff options
| author | Ben Kimock <kimockb@gmail.com> | 2025-03-16 06:01:32 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-16 06:01:32 +0000 |
| commit | ea2a2bd61adb62fe47300011ce0c743a98368f79 (patch) | |
| tree | 001d780c6d9145424e81b3488d472beb488fa237 /compiler/rustc_parse/src/parser/expr.rs | |
| parent | b724fabb5f86585cd7cc2b14daa2c5a34ed779ef (diff) | |
| parent | 17ae00d1228ced4eb5a19fa4371b080da87b6b2a (diff) | |
| download | rust-ea2a2bd61adb62fe47300011ce0c743a98368f79.tar.gz rust-ea2a2bd61adb62fe47300011ce0c743a98368f79.zip | |
Merge pull request #4229 from rust-lang/rustup-2025-03-16
Automatic Rustup
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index fc9a511d56a..41720e99e3b 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -2598,7 +2598,8 @@ impl<'a> Parser<'a> { } /// Parses the condition of a `if` or `while` expression. - fn parse_expr_cond(&mut self) -> PResult<'a, P<Expr>> { + // Public because it is used in rustfmt forks such as https://github.com/tucant/rustfmt/blob/30c83df9e1db10007bdd16dafce8a86b404329b2/src/parse/macros/html.rs#L57 for custom if expressions. + pub fn parse_expr_cond(&mut self) -> PResult<'a, P<Expr>> { let attrs = self.parse_outer_attributes()?; let (mut cond, _) = self.parse_expr_res(Restrictions::NO_STRUCT_LITERAL | Restrictions::ALLOW_LET, attrs)?; |
