rename mir::Constant -> mir::ConstOperand, mir::ConstKind -> mir::Const

This commit is contained in:
Ralf Jung 2023-09-20 20:51:14 +02:00
parent a2374e65aa
commit c94410c145
72 changed files with 430 additions and 449 deletions

View file

@ -497,10 +497,10 @@ impl<'tcx> CloneShimBuilder<'tcx> {
// `func == Clone::clone(&ty) -> ty`
let func_ty = Ty::new_fn_def(tcx, self.def_id, [ty]);
let func = Operand::Constant(Box::new(Constant {
let func = Operand::Constant(Box::new(ConstOperand {
span: self.span,
user_ty: None,
literal: ConstantKind::zero_sized(func_ty),
const_: Const::zero_sized(func_ty),
}));
let ref_loc = self.make_place(
@ -764,10 +764,10 @@ fn build_call_shim<'tcx>(
CallKind::Direct(def_id) => {
let ty = tcx.type_of(def_id).instantiate_identity();
(
Operand::Constant(Box::new(Constant {
Operand::Constant(Box::new(ConstOperand {
span,
user_ty: None,
literal: ConstantKind::zero_sized(ty),
const_: Const::zero_sized(ty),
})),
rcvr.into_iter().collect::<Vec<_>>(),
)