Skip to content

Commit 2a58875

Browse files
committed
improved debug output
1 parent 88cd367 commit 2a58875

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

src/librustc/traits/fulfill.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ impl<'a, 'gcx, 'tcx> FulfillmentContext<'tcx> {
112112
selcx,
113113
register_region_obligations: self.register_region_obligations
114114
});
115-
debug!("select: outcome={:?}", outcome);
115+
debug!("select: outcome={:#?}", outcome);
116116

117117
// FIXME: if we kept the original cache key, we could mark projection
118118
// obligations as complete for the projection cache here.

src/librustc/traits/project.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,10 @@ pub fn poly_project_and_unify_type<'cx, 'gcx, 'tcx>(
196196
let span = obligation.cause.span;
197197
match infcx.leak_check(false, span, &skol_map, snapshot) {
198198
Ok(()) => Ok(infcx.plug_leaks(skol_map, snapshot, result)),
199-
Err(e) => Err(MismatchedProjectionTypes { err: e }),
199+
Err(e) => {
200+
debug!("poly_project_and_unify_type: leak check encountered error {:?}", e);
201+
Err(MismatchedProjectionTypes { err: e })
202+
}
200203
}
201204
}
202205
Err(e) => {
@@ -243,7 +246,10 @@ fn project_and_unify_type<'cx, 'gcx, 'tcx>(
243246
obligations.extend(inferred_obligations);
244247
Ok(Some(obligations))
245248
},
246-
Err(err) => Err(MismatchedProjectionTypes { err: err }),
249+
Err(err) => {
250+
debug!("project_and_unify_type: equating types encountered error {:?}", err);
251+
Err(MismatchedProjectionTypes { err: err })
252+
}
247253
}
248254
}
249255

src/librustc_traits/normalize_erasing_regions.rs

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ crate fn normalize_ty_after_erasing_regions<'tcx>(
1717
tcx: TyCtxt<'_, 'tcx, 'tcx>,
1818
goal: ParamEnvAnd<'tcx, Ty<'tcx>>,
1919
) -> Ty<'tcx> {
20+
debug!("normalize_ty_after_erasing_regions(goal={:#?})", goal);
21+
2022
let ParamEnvAnd { param_env, value } = goal;
2123
tcx.sess.perf_stats.normalize_ty_after_erasing_regions.fetch_add(1, Ordering::Relaxed);
2224
tcx.infer_ctxt().enter(|infcx| {

0 commit comments

Comments
 (0)