Use hir_id instead of fetching hir_id via the NodeId
This commit is contained in:
parent
8adc42b5b4
commit
edcf6e7e80
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user