]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/copy_iterator.rs
Rollup merge of #83092 - petrochenkov:qspan, r=estebank
[rust.git] / clippy_lints / src / copy_iterator.rs
index 48899b33899370b0afd37f57f8281d2a7bc41d15..004bce5f62a8f74e4e850a1ecd0ca2d0b51a4f23 100644 (file)
@@ -38,7 +38,7 @@ fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) {
             ..
         }) = 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(