@@ -42,7 +42,7 @@ fn is_short_pattern_inner(pat: &ast::Pat) -> bool {
42
42
| ast:: PatKind :: Never
43
43
| ast:: PatKind :: Wild
44
44
| ast:: PatKind :: Err ( _)
45
- | ast:: PatKind :: Lit ( _) => true ,
45
+ | ast:: PatKind :: Expr ( _) => true ,
46
46
ast:: PatKind :: Ident ( _, _, ref pat) => pat. is_none ( ) ,
47
47
ast:: PatKind :: Struct ( ..)
48
48
| ast:: PatKind :: MacCall ( ..)
@@ -293,7 +293,7 @@ impl Rewrite for Pat {
293
293
let path_str = rewrite_path ( context, PathContext :: Expr , q_self, path, shape) ?;
294
294
rewrite_tuple_pat ( pat_vec, Some ( path_str) , self . span , context, shape)
295
295
}
296
- PatKind :: Lit ( ref expr) => expr. rewrite_result ( context, shape) ,
296
+ PatKind :: Expr ( ref expr) => expr. rewrite_result ( context, shape) ,
297
297
PatKind :: Slice ( ref slice_pat)
298
298
if context. config . style_edition ( ) <= StyleEdition :: Edition2021 =>
299
299
{
@@ -530,7 +530,7 @@ pub(crate) fn can_be_overflowed_pat(
530
530
ast:: PatKind :: Ref ( ref p, _) | ast:: PatKind :: Box ( ref p) => {
531
531
can_be_overflowed_pat ( context, & TuplePatField :: Pat ( p) , len)
532
532
}
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) ,
534
534
_ => false ,
535
535
} ,
536
536
TuplePatField :: Dotdot ( ..) => false ,
0 commit comments