1
Fork 0

Remove box syntax from rustc_middle

This commit is contained in:
est31 2021-08-05 05:14:53 +02:00
parent 8830f8e30c
commit dcdadc4d8d
3 changed files with 6 additions and 7 deletions

View file

@ -2061,11 +2061,11 @@ impl<'tcx> Operand<'tcx> {
span: Span,
) -> Self {
let ty = tcx.type_of(def_id).subst(tcx, substs);
Operand::Constant(box Constant {
Operand::Constant(Box::new(Constant {
span,
user_ty: None,
literal: ConstantKind::Ty(ty::Const::zero_sized(tcx, ty)),
})
}))
}
pub fn is_move(&self) -> bool {
@ -2092,11 +2092,11 @@ impl<'tcx> Operand<'tcx> {
};
scalar_size == type_size
});
Operand::Constant(box Constant {
Operand::Constant(Box::new(Constant {
span,
user_ty: None,
literal: ConstantKind::Val(ConstValue::Scalar(val), ty),
})
}))
}
pub fn to_copy(&self) -> Self {