fix the inspector

This commit is contained in:
Oliver Schneider
2016-11-18 13:21:07 +01:00
parent 945c027768
commit f39c6278e1

View File

@@ -350,25 +350,25 @@ fn print_item(cx: &LateContext, item: &hir::Item) {
} }
} }
hir::ItemUse(ref path) => println!("{:?}", path.node), hir::ItemUse(ref path) => println!("{:?}", path.node),
hir::ItemStatic(..) => (), //println!("static item: {:#?}", cx.tcx.opt_lookup_item_type(did)), hir::ItemStatic(..) => println!("static item of type {:#?}", cx.tcx.item_type(did)),
hir::ItemConst(..) => (), //println!("const item: {:#?}", cx.tcx.opt_lookup_item_type(did)), hir::ItemConst(..) => println!("const item of type {:#?}", cx.tcx.item_type(did)),
hir::ItemFn(..) => { hir::ItemFn(..) => {
//let item_ty = cx.tcx.opt_lookup_item_type(did); let item_ty = cx.tcx.item_type(did);
//println!("function: {:#?}", item_ty); println!("function of type {:#?}", item_ty);
}, },
hir::ItemMod(..) => println!("module"), hir::ItemMod(..) => println!("module"),
hir::ItemForeignMod(ref fm) => println!("foreign module with abi: {}", fm.abi), hir::ItemForeignMod(ref fm) => println!("foreign module with abi: {}", fm.abi),
hir::ItemTy(..) => { hir::ItemTy(..) => {
//println!("type alias: {:?}", cx.tcx.opt_lookup_item_type(did)); println!("type alias for {:?}", cx.tcx.item_type(did));
}, },
hir::ItemEnum(..) => { hir::ItemEnum(..) => {
//println!("enum definition: {:?}", cx.tcx.opt_lookup_item_type(did)); println!("enum definition of type {:?}", cx.tcx.item_type(did));
}, },
hir::ItemStruct(..) => { hir::ItemStruct(..) => {
//println!("struct definition: {:?}", cx.tcx.opt_lookup_item_type(did)); println!("struct definition of type {:?}", cx.tcx.item_type(did));
}, },
hir::ItemUnion(..) => { hir::ItemUnion(..) => {
//println!("union definition: {:?}", cx.tcx.opt_lookup_item_type(did)); println!("union definition of type {:?}", cx.tcx.item_type(did));
}, },
hir::ItemTrait(..) => { hir::ItemTrait(..) => {
println!("trait decl"); println!("trait decl");