diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index 092606d56..c75b61c67 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -89,8 +89,8 @@ pub fn in_constant(cx: &LateContext<'_, '_>, id: HirId) -> bool { Node::Item(&Item { kind: ItemKind::Fn(ref sig, ..), .. - }) => sig.header.constness == Constness::Const, - Node::ImplItem(&ImplItem { + }) + | Node::ImplItem(&ImplItem { kind: ImplItemKind::Method(ref sig, _), .. }) => sig.header.constness == Constness::Const,