Skip to content

Commit 4449240

Browse files
spastorinonikomatsakis
authored andcommitted
Add more debug logs
1 parent 688ab5a commit 4449240

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

src/librustc/infer/outlives/obligations.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,12 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
8888
body_id: ast::NodeId,
8989
obligation: RegionObligation<'tcx>,
9090
) {
91-
debug!("register_region_obligation({:?}, {:?})", body_id, obligation);
91+
debug!(
92+
"register_region_obligation(body_id={:?}, obligation={:?})",
93+
body_id,
94+
obligation
95+
);
96+
9297
self.region_obligations
9398
.borrow_mut()
9499
.push((body_id, obligation));
@@ -139,6 +144,8 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
139144
"cannot process registered region obligations in a snapshot"
140145
);
141146

147+
debug!("process_registered_region_obligations()");
148+
142149
// pull out the region obligations with the given `body_id` (leaving the rest)
143150
let mut my_region_obligations = Vec::with_capacity(self.region_obligations.borrow().len());
144151
{
@@ -157,6 +164,13 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
157164
cause,
158165
} in my_region_obligations
159166
{
167+
debug!(
168+
"process_registered_region_obligations: sup_type={:?} sub_region={:?} cause={:?}",
169+
sup_type,
170+
sub_region,
171+
cause
172+
);
173+
160174
let origin = SubregionOrigin::from_obligation_cause(
161175
&cause,
162176
|| infer::RelateParamBound(cause.span, sup_type),

src/librustc_mir/transform/type_check.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,6 +1284,12 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> {
12841284
) {
12851285
let tcx = self.tcx();
12861286

1287+
debug!(
1288+
"prove_aggregate_predicates(aggregate_kind={:?}, location={:?})",
1289+
aggregate_kind,
1290+
location
1291+
);
1292+
12871293
let instantiated_predicates = match aggregate_kind {
12881294
AggregateKind::Adt(def, _, substs, _) => {
12891295
tcx.predicates_of(def.did).instantiate(tcx, substs)
@@ -1299,6 +1305,7 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> {
12991305
};
13001306

13011307
let predicates = self.normalize(&instantiated_predicates.predicates, location);
1308+
debug!("prove_aggregate_predicates: predicates={:?}", predicates);
13021309
self.prove_predicates(&predicates, location);
13031310
}
13041311

@@ -1312,6 +1319,11 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> {
13121319
}
13131320

13141321
fn prove_predicates(&mut self, predicates: &[ty::Predicate<'tcx>], location: Location) {
1322+
debug!(
1323+
"prove_predicates(predicates={:?}, location={:?})",
1324+
predicates,
1325+
location
1326+
);
13151327
self.fully_perform_op(location.at_self(), |this| {
13161328
let cause = this.misc(this.last_span);
13171329
let obligations = predicates

0 commit comments

Comments
 (0)