Add more debug logs
This commit is contained in:
parent
688ab5af81
commit
4449240d1e
@ -88,7 +88,12 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
|
||||
body_id: ast::NodeId,
|
||||
obligation: RegionObligation<'tcx>,
|
||||
) {
|
||||
debug!("register_region_obligation({:?}, {:?})", body_id, obligation);
|
||||
debug!(
|
||||
"register_region_obligation(body_id={:?}, obligation={:?})",
|
||||
body_id,
|
||||
obligation
|
||||
);
|
||||
|
||||
self.region_obligations
|
||||
.borrow_mut()
|
||||
.push((body_id, obligation));
|
||||
@ -139,6 +144,8 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
|
||||
"cannot process registered region obligations in a snapshot"
|
||||
);
|
||||
|
||||
debug!("process_registered_region_obligations()");
|
||||
|
||||
// pull out the region obligations with the given `body_id` (leaving the rest)
|
||||
let mut my_region_obligations = Vec::with_capacity(self.region_obligations.borrow().len());
|
||||
{
|
||||
@ -157,6 +164,13 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
|
||||
cause,
|
||||
} in my_region_obligations
|
||||
{
|
||||
debug!(
|
||||
"process_registered_region_obligations: sup_type={:?} sub_region={:?} cause={:?}",
|
||||
sup_type,
|
||||
sub_region,
|
||||
cause
|
||||
);
|
||||
|
||||
let origin = SubregionOrigin::from_obligation_cause(
|
||||
&cause,
|
||||
|| infer::RelateParamBound(cause.span, sup_type),
|
||||
|
@ -1284,6 +1284,12 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> {
|
||||
) {
|
||||
let tcx = self.tcx();
|
||||
|
||||
debug!(
|
||||
"prove_aggregate_predicates(aggregate_kind={:?}, location={:?})",
|
||||
aggregate_kind,
|
||||
location
|
||||
);
|
||||
|
||||
let instantiated_predicates = match aggregate_kind {
|
||||
AggregateKind::Adt(def, _, substs, _) => {
|
||||
tcx.predicates_of(def.did).instantiate(tcx, substs)
|
||||
@ -1299,6 +1305,7 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> {
|
||||
};
|
||||
|
||||
let predicates = self.normalize(&instantiated_predicates.predicates, location);
|
||||
debug!("prove_aggregate_predicates: predicates={:?}", predicates);
|
||||
self.prove_predicates(&predicates, location);
|
||||
}
|
||||
|
||||
@ -1312,6 +1319,11 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> {
|
||||
}
|
||||
|
||||
fn prove_predicates(&mut self, predicates: &[ty::Predicate<'tcx>], location: Location) {
|
||||
debug!(
|
||||
"prove_predicates(predicates={:?}, location={:?})",
|
||||
predicates,
|
||||
location
|
||||
);
|
||||
self.fully_perform_op(location.at_self(), |this| {
|
||||
let cause = this.misc(this.last_span);
|
||||
let obligations = predicates
|
||||
|
Loading…
x
Reference in New Issue
Block a user