use crate::utils::{is_copy, match_path, paths, span_lint_and_note};
-use rustc_hir::{Item, ItemKind, Impl};
+use rustc_hir::{Impl, Item, ItemKind};
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
..
}) = item.kind
{
- let ty = cx.tcx.type_of(cx.tcx.hir().local_def_id(item.hir_id));
+ let ty = cx.tcx.type_of(item.def_id);
if is_copy(cx, ty) && match_path(&trait_ref.path, &paths::ITERATOR) {
span_lint_and_note(