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 | 02c1774cd3e4239c26b67ae78a21a87f4e460fad (patch) | |
| tree | 7deb64813c4b5b61f7f3d0672789f865a2e6707a /src/tools/clippy | |
| parent | 089a016919b0a9daaed9f676804102d6ba3f8f9d (diff) | |
| download | rust-02c1774cd3e4239c26b67ae78a21a87f4e460fad.tar.gz rust-02c1774cd3e4239c26b67ae78a21a87f4e460fad.zip | |
Give inline const separate DefKind
Diffstat (limited to 'src/tools/clippy')
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/matches.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools/clippy/clippy_lints/src/matches.rs b/src/tools/clippy/clippy_lints/src/matches.rs index eb311983b29..7142df98c3f 100644 --- a/src/tools/clippy/clippy_lints/src/matches.rs +++ b/src/tools/clippy/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, }; |
