add some debug! into lowering

This commit is contained in:
Niko Matsakis 2018-11-21 13:35:54 -05:00
parent d0a174d41b
commit 40f8094003

View File

@ -1866,6 +1866,10 @@ fn lower_path_segment(
} else {
self.lower_node_id(segment.id)
};
debug!(
"lower_path_segment: ident={:?} original-id={:?} new-id={:?}",
segment.ident, segment.id, id,
);
hir::PathSegment::new(
segment.ident,
@ -2955,6 +2959,9 @@ fn lower_use_tree(
name: &mut Name,
attrs: &hir::HirVec<Attribute>,
) -> hir::ItemKind {
debug!("lower_use_tree(tree={:?})", tree);
debug!("lower_use_tree: vis = {:?}", vis);
let path = &tree.prefix;
let segments = prefix
.segments
@ -4540,6 +4547,7 @@ fn lower_visibility(
VisibilityKind::Public => hir::VisibilityKind::Public,
VisibilityKind::Crate(sugar) => hir::VisibilityKind::Crate(sugar),
VisibilityKind::Restricted { ref path, id } => {
debug!("lower_visibility: restricted path id = {:?}", id);
let lowered_id = if let Some(owner) = explicit_owner {
self.lower_node_id_with_owner(id, owner)
} else {