Skip to content

Commit

Permalink
add some debug! to type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Oct 8, 2018
1 parent 16e1aaf commit ccba716
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions src/librustc_typeck/check/mod.rs
Expand Up @@ -3759,6 +3759,13 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
expected: Expectation<'tcx>,
needs: Needs
) -> Ty<'tcx> {
debug!(
"check_expr_kind(expr={:?}, expected={:?}, needs={:?})",
expr,
expected,
needs,
);

let tcx = self.tcx;
let id = expr.id;
match expr.node {
Expand Down Expand Up @@ -4988,10 +4995,13 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
span: Span,
node_id: ast::NodeId)
-> (Ty<'tcx>, Def) {
debug!("instantiate_value_path(path={:?}, def={:?}, node_id={})",
segments,
def,
node_id);
debug!(
"instantiate_value_path(segments={:?}, self_ty={:?}, def={:?}, node_id={})",
segments,
self_ty,
def,
node_id,
);

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

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

debug!(
"instantiate_value_path: id={:?} substs={:?}",
node_id,
substs,
);
self.write_user_substs_from_substs(hir_id, substs);

(ty_substituted, new_def)
Expand Down

0 comments on commit ccba716

Please sign in to comment.