Skip to content

Commit 06ff325

Browse files
committed
Rename PatKind::Lit to Expr
1 parent 840eb96 commit 06ff325

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/patterns.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ fn is_short_pattern_inner(pat: &ast::Pat) -> bool {
4242
| ast::PatKind::Never
4343
| ast::PatKind::Wild
4444
| ast::PatKind::Err(_)
45-
| ast::PatKind::Lit(_) => true,
45+
| ast::PatKind::Expr(_) => true,
4646
ast::PatKind::Ident(_, _, ref pat) => pat.is_none(),
4747
ast::PatKind::Struct(..)
4848
| ast::PatKind::MacCall(..)
@@ -293,7 +293,7 @@ impl Rewrite for Pat {
293293
let path_str = rewrite_path(context, PathContext::Expr, q_self, path, shape)?;
294294
rewrite_tuple_pat(pat_vec, Some(path_str), self.span, context, shape)
295295
}
296-
PatKind::Lit(ref expr) => expr.rewrite_result(context, shape),
296+
PatKind::Expr(ref expr) => expr.rewrite_result(context, shape),
297297
PatKind::Slice(ref slice_pat)
298298
if context.config.style_edition() <= StyleEdition::Edition2021 =>
299299
{
@@ -530,7 +530,7 @@ pub(crate) fn can_be_overflowed_pat(
530530
ast::PatKind::Ref(ref p, _) | ast::PatKind::Box(ref p) => {
531531
can_be_overflowed_pat(context, &TuplePatField::Pat(p), len)
532532
}
533-
ast::PatKind::Lit(ref expr) => can_be_overflowed_expr(context, expr, len),
533+
ast::PatKind::Expr(ref expr) => can_be_overflowed_expr(context, expr, len),
534534
_ => false,
535535
},
536536
TuplePatField::Dotdot(..) => false,

0 commit comments

Comments
 (0)