From 0cb9ac2d964e67a2fe71c0a042e6db2361aba547 Mon Sep 17 00:00:00 2001 From: Gary Guo Date: Sat, 2 Oct 2021 12:59:26 +0100 Subject: [PATCH] Give inline const separate DefKind --- clippy_lints/src/matches.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clippy_lints/src/matches.rs b/clippy_lints/src/matches.rs index eb311983b..7142df98c 100644 --- a/clippy_lints/src/matches.rs +++ b/clippy_lints/src/matches.rs @@ -1065,7 +1065,10 @@ fn check_wild_enum_match(cx: &LateContext<'_>, ex: &Expr<'_>, arms: &[Arm<'_>]) PatKind::Path(path) => { #[allow(clippy::match_same_arms)] let id = match cx.qpath_res(path, pat.hir_id) { - Res::Def(DefKind::Const | DefKind::ConstParam | DefKind::AnonConst, _) => return, + Res::Def( + DefKind::Const | DefKind::ConstParam | DefKind::AnonConst | DefKind::InlineConst, + _, + ) => return, Res::Def(_, id) => id, _ => return, };