Skip to content

Commit 401a243

Browse files
committed
astconv.rs: extended ast_ty_to_ty debugging
1 parent 33200a3 commit 401a243

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/librustc_typeck/astconv.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1523,12 +1523,13 @@ pub fn ast_ty_to_ty<'tcx>(this: &AstConv<'tcx>,
15231523
ast_ty: &ast::Ty)
15241524
-> Ty<'tcx>
15251525
{
1526-
debug!("ast_ty_to_ty(ast_ty={:?})",
1527-
ast_ty);
1526+
debug!("ast_ty_to_ty(id={:?}, ast_ty={:?})",
1527+
ast_ty.id, ast_ty);
15281528

15291529
let tcx = this.tcx();
15301530

15311531
if let Some(&ty) = tcx.ast_ty_to_ty_cache.borrow().get(&ast_ty.id) {
1532+
debug!("ast_ty_to_ty: id={:?} ty={:?} (cached)", ast_ty.id, ty);
15321533
return ty;
15331534
}
15341535

@@ -1667,6 +1668,7 @@ pub fn ast_ty_to_ty<'tcx>(this: &AstConv<'tcx>,
16671668
}
16681669
};
16691670

1671+
debug!("ast_ty_to_ty: id={:?} ty={:?}", ast_ty.id, typ);
16701672
tcx.ast_ty_to_ty_cache.borrow_mut().insert(ast_ty.id, typ);
16711673
return typ;
16721674
}

0 commit comments

Comments
 (0)