Skip to content

Commit ccba716

Browse files
committed
add some debug! to type checking
1 parent 16e1aaf commit ccba716

File tree

1 file changed

+19
-4
lines changed
  • src/librustc_typeck/check

1 file changed

+19
-4
lines changed

src/librustc_typeck/check/mod.rs

+19-4
Original file line numberDiff line numberDiff line change
@@ -3759,6 +3759,13 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
37593759
expected: Expectation<'tcx>,
37603760
needs: Needs
37613761
) -> Ty<'tcx> {
3762+
debug!(
3763+
"check_expr_kind(expr={:?}, expected={:?}, needs={:?})",
3764+
expr,
3765+
expected,
3766+
needs,
3767+
);
3768+
37623769
let tcx = self.tcx;
37633770
let id = expr.id;
37643771
match expr.node {
@@ -4988,10 +4995,13 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
49884995
span: Span,
49894996
node_id: ast::NodeId)
49904997
-> (Ty<'tcx>, Def) {
4991-
debug!("instantiate_value_path(path={:?}, def={:?}, node_id={})",
4992-
segments,
4993-
def,
4994-
node_id);
4998+
debug!(
4999+
"instantiate_value_path(segments={:?}, self_ty={:?}, def={:?}, node_id={})",
5000+
segments,
5001+
self_ty,
5002+
def,
5003+
node_id,
5004+
);
49955005

49965006
let path_segs = self.def_ids_for_path_segments(segments, def);
49975007

@@ -5201,6 +5211,11 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
52015211
let hir_id = self.tcx.hir.node_to_hir_id(node_id);
52025212
self.write_substs(hir_id, substs);
52035213

5214+
debug!(
5215+
"instantiate_value_path: id={:?} substs={:?}",
5216+
node_id,
5217+
substs,
5218+
);
52045219
self.write_user_substs_from_substs(hir_id, substs);
52055220

52065221
(ty_substituted, new_def)

0 commit comments

Comments
 (0)