From edcf6e7e8044069f1b4f890248cb29d20bf8de35 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Sat, 9 Sep 2017 14:06:41 +0200 Subject: [PATCH] Use hir_id instead of fetching hir_id via the NodeId --- clippy_lints/src/utils/inspector.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);