aboutsummaryrefslogtreecommitdiffstats
path: root/yjit
diff options
context:
space:
mode:
authorAlan Wu <alanwu@ruby-lang.org>2023-10-17 17:49:45 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2023-10-17 18:36:23 -0400
commit36ee5d8ca824836e10ef18191d789a8b34f87fee (patch)
tree825c975fa7b297d4b085b187b30a229e772b0226 /yjit
parent2abd061e8beefbdead0296377948ce7a0098277b (diff)
downloadruby-36ee5d8ca824836e10ef18191d789a8b34f87fee.tar.gz
YJIT: Fix clippy::redundant_locals
> note: `#[deny(clippy::redundant_locals)]` on by default On Rust 1.73.0.
Diffstat (limited to 'yjit')
-rw-r--r--yjit/src/backend/ir.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/yjit/src/backend/ir.rs b/yjit/src/backend/ir.rs
index 67b5547bf9..35eccd51cf 100644
--- a/yjit/src/backend/ir.rs
+++ b/yjit/src/backend/ir.rs
@@ -1056,11 +1056,10 @@ impl Assembler
/// Append an instruction onto the current list of instructions and update
/// the live ranges of any instructions whose outputs are being used as
/// operands to this instruction.
- pub fn push_insn(&mut self, insn: Insn) {
+ pub fn push_insn(&mut self, mut insn: Insn) {
// Index of this instruction
let insn_idx = self.insns.len();
- let mut insn = insn;
let mut opnd_iter = insn.opnd_iter_mut();
while let Some(opnd) = opnd_iter.next() {
match opnd {
@@ -1089,7 +1088,6 @@ impl Assembler
}
// Set a side exit context to Target::SideExit
- let mut insn = insn;
if let Some(Target::SideExit { context, .. }) = insn.target_mut() {
// We should skip this when this instruction is being copied from another Assembler.
if context.is_none() {