diff --git a/clippy_lints/src/utils/inspector.rs b/clippy_lints/src/utils/inspector.rs index 1713096ff2d..e74f1639e4b 100644 --- a/clippy_lints/src/utils/inspector.rs +++ b/clippy_lints/src/utils/inspector.rs @@ -360,7 +360,7 @@ fn print_item(cx: &LateContext, item: &hir::Item) { } match item.node { hir::ItemExternCrate(ref _renamed_from) => { - if let Some(crate_id) = cx.tcx.extern_mod_stmt_cnum(cx.tcx.hir.node_to_hir_id(item.id)) { + if let Some(crate_id) = cx.tcx.extern_mod_stmt_cnum(item.hir_id) { let source = cx.tcx.used_crate_source(crate_id); if let Some(ref src) = source.dylib { println!("extern crate dylib source: {:?}", src.0);