Skip to content

Commit

Permalink
Use ty::Binder::bind to fix debug-assertions ICEs
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Oct 9, 2020
1 parent fb4d627 commit 9f7eab4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_typeck/src/bounds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9f7eab4

Please sign in to comment.