about summary refs log tree commit diff
path: root/clippy_lints/src/methods
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2022-03-29 17:11:12 +0200
committerCamille GILLOT <gillot.camille@gmail.com>2022-03-29 18:50:52 +0200
commite01897edcbcf89952b1823125c199a4ce8ec628d (patch)
tree45c3888db7b14e1b2044e652b15b35aa1f866eea /clippy_lints/src/methods
parenta7da8a601903eb3bd70523644dd0ce936359c13a (diff)
downloadrust-e01897edcbcf89952b1823125c199a4ce8ec628d.tar.gz
rust-e01897edcbcf89952b1823125c199a4ce8ec628d.zip
Remember mutability in `DefKind::Static`.
This allows to compute the `BodyOwnerKind` from `DefKind` only, and
removes a direct dependency of some MIR queries onto HIR.

As a side effect, it also simplifies metadata, since we don't need 4
flavours of `EntryKind::*Static` any more.
Diffstat (limited to 'clippy_lints/src/methods')
-rw-r--r--clippy_lints/src/methods/expect_fun_call.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/methods/expect_fun_call.rs b/clippy_lints/src/methods/expect_fun_call.rs
index c3cb02329a1..6f2307d8f18 100644
--- a/clippy_lints/src/methods/expect_fun_call.rs
+++ b/clippy_lints/src/methods/expect_fun_call.rs
@@ -93,7 +93,7 @@ pub(super) fn check<'tcx>(
             },
             hir::ExprKind::Path(ref p) => matches!(
                 cx.qpath_res(p, arg.hir_id),
-                hir::def::Res::Def(hir::def::DefKind::Const | hir::def::DefKind::Static, _)
+                hir::def::Res::Def(hir::def::DefKind::Const | hir::def::DefKind::Static(_), _)
             ),
             _ => false,
         }