@@ -7,7 +7,7 @@ use rustc_arena::DroplessArena;
7
7
use rustc_ast:: ast:: LitKind ;
8
8
use rustc_errors:: Applicability ;
9
9
use rustc_hir:: def_id:: DefId ;
10
- use rustc_hir:: { Arm , Expr , PatExprKind , HirId , HirIdMap , HirIdMapEntry , HirIdSet , Pat , PatKind , RangeEnd } ;
10
+ use rustc_hir:: { Arm , Expr , HirId , HirIdMap , HirIdMapEntry , HirIdSet , Pat , PatExprKind , PatKind , RangeEnd } ;
11
11
use rustc_lint:: builtin:: NON_EXHAUSTIVE_OMITTED_PATTERNS ;
12
12
use rustc_lint:: { LateContext , LintContext } ;
13
13
use rustc_middle:: ty;
@@ -311,9 +311,9 @@ impl<'a> NormalizedPat<'a> {
311
311
) ;
312
312
Self :: Tuple ( None , pats)
313
313
} ,
314
- PatKind :: Lit ( e) => match & e. kind {
314
+ PatKind :: Expr ( e) => match & e. kind {
315
315
// TODO: Handle negative integers. They're currently treated as a wild match.
316
- PatExprKind :: Lit { lit, negated : false } => match lit. node {
316
+ PatExprKind :: Lit { lit, negated : false } => match lit. node {
317
317
LitKind :: Str ( sym, _) => Self :: LitStr ( sym) ,
318
318
LitKind :: ByteStr ( ref bytes, _) | LitKind :: CStr ( ref bytes, _) => Self :: LitBytes ( bytes) ,
319
319
LitKind :: Byte ( val) => Self :: LitInt ( val. into ( ) ) ,
0 commit comments