/// let _: HashSet<Bad> = HashSet::new();
/// }
/// ```
+ #[clippy::version = "1.42.0"]
pub MUTABLE_KEY_TYPE,
suspicious,
"Check for mutable `Map`/`Set` key type"
fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<'tcx>) {
if let hir::ImplItemKind::Fn(ref sig, ..) = item.kind {
- if trait_ref_of_method(cx, item.hir_id()).is_none() {
+ if trait_ref_of_method(cx, item.def_id).is_none() {
check_sig(cx, item.hir_id(), sig.decl);
}
}