1
Fork 0

Replace mk_const with Const::new_x methods

This commit is contained in:
Boxy 2023-07-04 14:26:19 +01:00
parent cd68ead9ec
commit ddbc774e74
32 changed files with 219 additions and 134 deletions

View file

@ -386,11 +386,10 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
.type_of(param.def_id)
.no_bound_vars()
.expect("ct params cannot have early bound vars");
tcx.mk_const(
ty::ConstKind::Bound(
ty::INNERMOST,
ty::BoundVar::from_usize(num_bound_vars),
),
ty::Const::new_bound(
tcx,
ty::INNERMOST,
ty::BoundVar::from_usize(num_bound_vars),
ty,
)
.into()

View file

@ -1970,7 +1970,8 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
assert!(!ct.ty().has_escaping_bound_vars());
match ct.kind() {
ty::ConstKind::Bound(_, bv) => self.tcx.mk_const(
ty::ConstKind::Bound(_, bv) => ty::Const::new_placeholder(
self.tcx,
ty::PlaceholderConst { universe: self.universe, bound: bv },
ct.ty(),
),