about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-10-10 05:25:53 +0900
committerYuki Okushi <huyuumi.dev@gmail.com>2020-10-10 05:25:53 +0900
commit9f7eab4548388cc93fed635aacc1d59475bed89f (patch)
tree11449053877c61330d66dec0abbe4aa5ac7cb201
parentfb4d62759b6d4a5165f1a4401eb8c55c9f7f6211 (diff)
Use `ty::Binder::bind` to fix debug-assertions ICEs
-rw-r--r--compiler/rustc_typeck/src/bounds.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_typeck/src/bounds.rs b/compiler/rustc_typeck/src/bounds.rs
index 80f39051c58..683707470f4 100644
--- a/compiler/rustc_typeck/src/bounds.rs
+++ b/compiler/rustc_typeck/src/bounds.rs
@@ -72,7 +72,7 @@ impl<'tcx> Bounds<'tcx> {
                     .iter()
                     .map(|&(region_bound, span)| {
                         let outlives = ty::OutlivesPredicate(param_ty, region_bound);
-                        (ty::Binder::dummy(outlives).to_predicate(tcx), span)
+                        (ty::Binder::bind(outlives).to_predicate(tcx), span)
                     })
                     .chain(self.trait_bounds.iter().map(|&(bound_trait_ref, span, constness)| {
                         let predicate = bound_trait_ref.with_constness(constness).to_predicate(tcx);