@@ -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