mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
inspector: fix printing non-local trait refs
This commit is contained in:
parent
8664d03ec6
commit
9314965af0
1 changed files with 4 additions and 4 deletions
|
@ -379,12 +379,12 @@ fn print_item(cx: &LateContext, item: &hir::Item) {
|
|||
}
|
||||
},
|
||||
hir::ItemDefaultImpl(_, ref trait_ref) => {
|
||||
let trait_did = cx.tcx.map.local_def_id(trait_ref.ref_id);
|
||||
println!("default impl for `{:?}`", cx.tcx.item_path_str(trait_did));
|
||||
let trait_did = cx.tcx.expect_def(trait_ref.ref_id).def_id();
|
||||
println!("default impl for `{}`", cx.tcx.item_path_str(trait_did));
|
||||
},
|
||||
hir::ItemImpl(_, _, _, Some(ref trait_ref), _, _) => {
|
||||
let trait_did = cx.tcx.map.local_def_id(trait_ref.ref_id);
|
||||
println!("impl of trait `{:?}`", cx.tcx.item_path_str(trait_did));
|
||||
let trait_did = cx.tcx.expect_def(trait_ref.ref_id).def_id();
|
||||
println!("impl of trait `{}`", cx.tcx.item_path_str(trait_did));
|
||||
},
|
||||
hir::ItemImpl(_, _, _, None, _, _) => {
|
||||
println!("impl");
|
||||
|
|
Loading…
Reference in a new issue