about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2018-07-02 10:33:18 -0400
committerNiko Matsakis <niko@alum.mit.edu>2018-07-02 10:38:35 -0400
commit7bbbed9046d2c744e4b7717ad72ae38a1c24f38d (patch)
treeafb23a35c937cb9b65fc7e7ce243137f56390459
parentc9d4f0615f20c5ba392c10c04d5c9e2ac57b9715 (diff)
downloadrust-7bbbed9046d2c744e4b7717ad72ae38a1c24f38d.tar.gz
rust-7bbbed9046d2c744e4b7717ad72ae38a1c24f38d.zip
drive-by nits and debug
Co-authored-by: Tyler Mandry <tmandry@gmail.com>
-rw-r--r--src/librustc/traits/select.rs5
-rw-r--r--src/librustc/ty/mod.rs4
2 files changed, 7 insertions, 2 deletions
diff --git a/src/librustc/traits/select.rs b/src/librustc/traits/select.rs
index fe30b6a2f88..40171345f55 100644
--- a/src/librustc/traits/select.rs
+++ b/src/librustc/traits/select.rs
@@ -1237,6 +1237,11 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
         let mut candidates: Vec<EvaluatedCandidate> =
             candidates?.into_iter().filter_map(|c| c).collect();
 
+        debug!("winnowed to {} candidates for {:?}: {:?}",
+               candidates.len(),
+               stack,
+               candidates);
+
         // If there are STILL multiple candidate, we can further
         // reduce the list by dropping duplicates -- including
         // resolving specializations.
diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs
index 1f647d811b0..ab6922cac70 100644
--- a/src/librustc/ty/mod.rs
+++ b/src/librustc/ty/mod.rs
@@ -2862,8 +2862,8 @@ fn param_env<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
     }
     // Compute the bounds on Self and the type parameters.
 
-    let bounds = tcx.predicates_of(def_id).instantiate_identity(tcx);
-    let predicates = bounds.predicates;
+    let InstantiatedPredicates { predicates } =
+        tcx.predicates_of(def_id).instantiate_identity(tcx);
 
     // Finally, we have to normalize the bounds in the environment, in
     // case they contain any associated type projections. This process