Refactor tcx mk_const parameters.
This commit is contained in:
parent
6330c27ae2
commit
c97fd8183a
21 changed files with 74 additions and 104 deletions
|
@ -734,10 +734,10 @@ fn bound_vars_for_item<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> SubstsRef<'tcx
|
|||
}
|
||||
|
||||
ty::GenericParamDefKind::Const { .. } => tcx
|
||||
.mk_const(ty::ConstS {
|
||||
kind: ty::ConstKind::Bound(ty::INNERMOST, ty::BoundVar::from(param.index)),
|
||||
ty: tcx.type_of(param.def_id),
|
||||
})
|
||||
.mk_const(
|
||||
ty::ConstKind::Bound(ty::INNERMOST, ty::BoundVar::from(param.index)),
|
||||
tcx.type_of(param.def_id),
|
||||
)
|
||||
.into(),
|
||||
})
|
||||
}
|
||||
|
|
|
@ -546,7 +546,7 @@ impl<'tcx> LowerInto<'tcx, ty::Const<'tcx>> for &chalk_ir::Const<RustInterner<'t
|
|||
chalk_ir::ConstValue::Placeholder(_p) => unimplemented!(),
|
||||
chalk_ir::ConstValue::Concrete(c) => ty::ConstKind::Value(c.interned),
|
||||
};
|
||||
interner.tcx.mk_const(ty::ConstS { ty, kind })
|
||||
interner.tcx.mk_const(kind, ty)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue