fmt...
This commit is contained in:
parent
825a7cc65c
commit
49d001c5f3
2 changed files with 11 additions and 9 deletions
|
@ -511,7 +511,9 @@ impl<'cx, 'tcx> TypeFolder<'tcx> for Canonicalizer<'cx, 'tcx> {
|
||||||
}
|
}
|
||||||
ty::ConstKind::Placeholder(placeholder) => {
|
ty::ConstKind::Placeholder(placeholder) => {
|
||||||
return self.canonicalize_const_var(
|
return self.canonicalize_const_var(
|
||||||
CanonicalVarInfo { kind: CanonicalVarKind::PlaceholderConst(placeholder, ct.ty()) },
|
CanonicalVarInfo {
|
||||||
|
kind: CanonicalVarKind::PlaceholderConst(placeholder, ct.ty()),
|
||||||
|
},
|
||||||
ct,
|
ct,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -696,10 +698,13 @@ impl<'cx, 'tcx> Canonicalizer<'cx, 'tcx> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
CanonicalVarKind::PlaceholderConst(placeholder, t) => {
|
CanonicalVarKind::PlaceholderConst(placeholder, t) => {
|
||||||
CanonicalVarKind::PlaceholderConst(ty::Placeholder {
|
CanonicalVarKind::PlaceholderConst(
|
||||||
|
ty::Placeholder {
|
||||||
universe: reverse_universe_map[&placeholder.universe],
|
universe: reverse_universe_map[&placeholder.universe],
|
||||||
..placeholder
|
..placeholder
|
||||||
}, t)
|
},
|
||||||
|
t,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -744,10 +744,7 @@ impl<'tcx> TypeFolder<'tcx> for BoundVarReplacer<'_, 'tcx> {
|
||||||
}
|
}
|
||||||
ty::ConstKind::Bound(debruijn, bound_const) if debruijn >= self.current_index => {
|
ty::ConstKind::Bound(debruijn, bound_const) if debruijn >= self.current_index => {
|
||||||
let universe = self.universe_for(debruijn);
|
let universe = self.universe_for(debruijn);
|
||||||
let p = ty::PlaceholderConst {
|
let p = ty::PlaceholderConst { universe, name: bound_const };
|
||||||
universe,
|
|
||||||
name: bound_const,
|
|
||||||
};
|
|
||||||
self.mapped_consts.insert(p, bound_const);
|
self.mapped_consts.insert(p, bound_const);
|
||||||
self.infcx
|
self.infcx
|
||||||
.tcx
|
.tcx
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue