about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/expr.rs
diff options
context:
space:
mode:
authorTrevor Gross <t.gross35@gmail.com>2025-09-06 14:39:06 -0400
committerGitHub <noreply@github.com>2025-09-06 14:39:06 -0400
commitf338542c4264cda116c02101e22f3659c420ea7f (patch)
tree35edbc63afd4fa17b7fafaf209e270cba1c0e5f9 /compiler/rustc_parse/src/parser/expr.rs
parent865c99a09281af69e37cdd994f3c9b7a72fd8317 (diff)
parent7fada167f9a3cfcfa35fbfc33a17b926f8ef3352 (diff)
downloadrust-f338542c4264cda116c02101e22f3659c420ea7f.tar.gz
rust-f338542c4264cda116c02101e22f3659c420ea7f.zip
Rollup merge of #146280 - mohe2015:public-for-rustfmt-forks, r=lqd
Make `LetChainsPolicy` public for rustfmt usage

Related to https://github.com/rust-lang/rust/pull/138511. To call `Parser::parse_expr_cond` from [rustfmt forks for custom macro formatting](https://github.com/tucant/rustfmt/blob/30c83df9e1db10007bdd16dafce8a86b404329b2/src/parse/macros/html.rs#L57) you need to pass this enum so it would be nice if it could be public.

Thank you.
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs
index 9b09cbba7af..4c02547357e 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -2742,7 +2742,7 @@ impl<'a> Parser<'a> {
     /// The specified `edition` in `let_chains_policy` should be that of the whole `if` construct,
     /// i.e. the same span we use to later decide whether the drop behaviour should be that of
     /// edition `..=2021` or that of `2024..`.
-    // 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.
+    // Public to use it for custom `if` expressions in rustfmt forks like https://github.com/tucant/rustfmt
     pub fn parse_expr_cond(
         &mut self,
         let_chains_policy: LetChainsPolicy,