1
Fork 0

Rollup merge of #105870 - matthiaskrgr:useless_conv, r=oli-obk

avoid .into() conversion to identical types
This commit is contained in:
Matthias Krüger 2022-12-18 18:57:05 +01:00 committed by GitHub
commit 8892698903
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 {