Use `ty::Binder::bind` to fix debug-assertions ICEs

This commit is contained in:
Yuki Okushi 2020-10-10 05:25:53 +09:00
parent fb4d62759b
commit 9f7eab4548
1 changed files with 1 additions and 1 deletions

View File

@ -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);