1
Fork 0

avoid .into() conversion to identical types

This commit is contained in:
Matthias Krüger 2022-12-18 15:01:26 +01:00
parent 35a99eef32
commit 0aa4cde747
11 changed files with 17 additions and 27 deletions

View file

@ -701,8 +701,8 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
BinOp::Mul if const_arg.layout.ty.is_integral() && arg_value == 0 => {
if let Rvalue::CheckedBinaryOp(_, _) = rvalue {
let val = Immediate::ScalarPair(
const_arg.to_scalar().into(),
Scalar::from_bool(false).into(),
const_arg.to_scalar(),
Scalar::from_bool(false),
);
this.ecx.write_immediate(val, &dest)
} else {