]> git.lizzy.rs Git - rust.git/commitdiff
Use hir_id instead of fetching hir_id via the NodeId
authorOliver Schneider <git-no-reply-9879165716479413131@oli-obk.de>
Sat, 9 Sep 2017 12:06:41 +0000 (14:06 +0200)
committerOliver Schneider <git-no-reply-9879165716479413131@oli-obk.de>
Sat, 9 Sep 2017 12:06:41 +0000 (14:06 +0200)
clippy_lints/src/utils/inspector.rs

index 1713096ff2dc1041b3a9fdc79b15a79769731df5..e74f1639e4bbdc79119ae77bccd64853fc02f3dd 100644 (file)
@@ -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);