]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/from_over_into.rs
Rollup merge of #83092 - petrochenkov:qspan, r=estebank
[rust.git] / clippy_lints / src / from_over_into.rs
index b010abda24d108f35752b6edc602e8a86c185654..b644bb079908f821a0a699506aae9cb0ad5d132a 100644 (file)
@@ -60,10 +60,9 @@ fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) {
             return;
         }
 
-        let impl_def_id = cx.tcx.hir().local_def_id(item.hir_id);
         if_chain! {
             if let hir::ItemKind::Impl{ .. } = &item.kind;
-            if let Some(impl_trait_ref) = cx.tcx.impl_trait_ref(impl_def_id);
+            if let Some(impl_trait_ref) = cx.tcx.impl_trait_ref(item.def_id);
             if match_def_path(cx, impl_trait_ref.def_id, &INTO);
 
             then {