Skip to content

Commit f13166f

Browse files
committed
Make Parser::parse_expr_cond public.
This allows usage in rustfmt and rustfmt forks.
1 parent f7b4354 commit f13166f

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_parse/src/parser

1 file changed

+1
-1
lines changed

compiler/rustc_parse/src/parser/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2588,7 +2588,7 @@ impl<'a> Parser<'a> {
25882588
}
25892589

25902590
/// Parses the condition of a `if` or `while` expression.
2591-
fn parse_expr_cond(&mut self) -> PResult<'a, P<Expr>> {
2591+
pub fn parse_expr_cond(&mut self) -> PResult<'a, P<Expr>> {
25922592
let attrs = self.parse_outer_attributes()?;
25932593
let (mut cond, _) =
25942594
self.parse_expr_res(Restrictions::NO_STRUCT_LITERAL | Restrictions::ALLOW_LET, attrs)?;

0 commit comments

Comments
 (0)