implement valtrees as the type-system representation for constant values

This commit is contained in:
b-naber
2022-02-16 10:56:01 +01:00
parent edab34ab2a
commit 705d818bd5
116 changed files with 1606 additions and 1032 deletions

View File

@@ -430,7 +430,7 @@ impl<'tcx> CloneShimBuilder<'tcx> {
let func = Operand::Constant(Box::new(Constant {
span: self.span,
user_ty: None,
literal: ty::Const::zero_sized(tcx, func_ty).into(),
literal: ConstantKind::zero_sized(func_ty),
}));
let ref_loc = self.make_place(
@@ -630,7 +630,7 @@ fn build_call_shim<'tcx>(
Operand::Constant(Box::new(Constant {
span,
user_ty: None,
literal: ty::Const::zero_sized(tcx, ty).into(),
literal: ConstantKind::zero_sized(ty),
})),
rcvr.into_iter().collect::<Vec<_>>(),
)