about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2018-04-26 13:31:24 -0400
committerNiko Matsakis <niko@alum.mit.edu>2018-04-26 13:31:24 -0400
commit2a58875fa2eafadf1dfaa0d3f474e3bd937ee671 (patch)
tree97218738400936b6c71e406519a37c47ecc217b1 /src
parent88cd36714c6d62393f18d8efa2ea2724e1ec4a9d (diff)
downloadrust-2a58875fa2eafadf1dfaa0d3f474e3bd937ee671.tar.gz
rust-2a58875fa2eafadf1dfaa0d3f474e3bd937ee671.zip
improved debug output
Diffstat (limited to 'src')
-rw-r--r--src/librustc/traits/fulfill.rs2
-rw-r--r--src/librustc/traits/project.rs10
-rw-r--r--src/librustc_traits/normalize_erasing_regions.rs2
3 files changed, 11 insertions, 3 deletions
diff --git a/src/librustc/traits/fulfill.rs b/src/librustc/traits/fulfill.rs
index 1c091d68a2e..5ec2e32b6a4 100644
--- a/src/librustc/traits/fulfill.rs
+++ b/src/librustc/traits/fulfill.rs
@@ -112,7 +112,7 @@ impl<'a, 'gcx, 'tcx> FulfillmentContext<'tcx> {
                 selcx,
                 register_region_obligations: self.register_region_obligations
             });
-            debug!("select: outcome={:?}", outcome);
+            debug!("select: outcome={:#?}", outcome);
 
             // FIXME: if we kept the original cache key, we could mark projection
             // obligations as complete for the projection cache here.
diff --git a/src/librustc/traits/project.rs b/src/librustc/traits/project.rs
index 1c7942139e9..0c35e20324c 100644
--- a/src/librustc/traits/project.rs
+++ b/src/librustc/traits/project.rs
@@ -196,7 +196,10 @@ pub fn poly_project_and_unify_type<'cx, 'gcx, 'tcx>(
                 let span = obligation.cause.span;
                 match infcx.leak_check(false, span, &skol_map, snapshot) {
                     Ok(()) => Ok(infcx.plug_leaks(skol_map, snapshot, result)),
-                    Err(e) => Err(MismatchedProjectionTypes { err: e }),
+                    Err(e) => {
+                        debug!("poly_project_and_unify_type: leak check encountered error {:?}", e);
+                        Err(MismatchedProjectionTypes { err: e })
+                    }
                 }
             }
             Err(e) => {
@@ -243,7 +246,10 @@ fn project_and_unify_type<'cx, 'gcx, 'tcx>(
             obligations.extend(inferred_obligations);
             Ok(Some(obligations))
         },
-        Err(err) => Err(MismatchedProjectionTypes { err: err }),
+        Err(err) => {
+            debug!("project_and_unify_type: equating types encountered error {:?}", err);
+            Err(MismatchedProjectionTypes { err: err })
+        }
     }
 }
 
diff --git a/src/librustc_traits/normalize_erasing_regions.rs b/src/librustc_traits/normalize_erasing_regions.rs
index 1857df5717b..299433d479d 100644
--- a/src/librustc_traits/normalize_erasing_regions.rs
+++ b/src/librustc_traits/normalize_erasing_regions.rs
@@ -17,6 +17,8 @@ crate fn normalize_ty_after_erasing_regions<'tcx>(
     tcx: TyCtxt<'_, 'tcx, 'tcx>,
     goal: ParamEnvAnd<'tcx, Ty<'tcx>>,
 ) -> Ty<'tcx> {
+    debug!("normalize_ty_after_erasing_regions(goal={:#?})", goal);
+
     let ParamEnvAnd { param_env, value } = goal;
     tcx.sess.perf_stats.normalize_ty_after_erasing_regions.fetch_add(1, Ordering::Relaxed);
     tcx.infer_ctxt().enter(|infcx| {