diff options
| author | Gary Guo <gary@garyguo.net> | 2021-10-02 12:59:26 +0100 |
|---|---|---|
| committer | Gary Guo <gary@garyguo.net> | 2021-11-07 03:59:06 +0000 |
| commit | 0cb9ac2d964e67a2fe71c0a042e6db2361aba547 (patch) | |
| tree | a7d2b16987e5bd56ab6ac5b413df0c028b370612 | |
| parent | e674d0a59924a5c36ce0ccb6e21d6e2419b08145 (diff) | |
| download | rust-0cb9ac2d964e67a2fe71c0a042e6db2361aba547.tar.gz rust-0cb9ac2d964e67a2fe71c0a042e6db2361aba547.zip | |
Give inline const separate DefKind
| -rw-r--r-- | clippy_lints/src/matches.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clippy_lints/src/matches.rs b/clippy_lints/src/matches.rs index eb311983b29..7142df98c3f 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, }; |
