]> git.lizzy.rs Git - rust.git/commitdiff
EarlyOtherwiseBranch::run_pass(): don't convert Place to Place (clippy::useless_conve...
authorMatthias Krüger <matthias.krueger@famsik.de>
Mon, 21 Sep 2020 23:11:45 +0000 (01:11 +0200)
committerMatthias Krüger <matthias.krueger@famsik.de>
Thu, 24 Sep 2020 11:38:07 +0000 (13:38 +0200)
compiler/rustc_mir/src/transform/early_otherwise_branch.rs

index 67e679a8b08d02390fb466714389bfe4170a64c6..7a9089d0f3675c1893cd02b1326c626131c64a0f 100644 (file)
@@ -91,7 +91,7 @@ fn run_pass(&self, tcx: TyCtxt<'tcx>, source: MirSource<'tcx>, body: &mut Body<'
             let not_equal_rvalue = Rvalue::BinaryOp(
                 not_equal,
                 Operand::Copy(Place::from(second_discriminant_temp)),
-                Operand::Copy(Place::from(first_descriminant_place)),
+                Operand::Copy(first_descriminant_place),
             );
             patch.add_statement(
                 end_of_block_location,