diff --git a/lib/cretonne/src/legalizer/globalvar.rs b/lib/cretonne/src/legalizer/globalvar.rs index 308c8df9e5..42856edc9b 100644 --- a/lib/cretonne/src/legalizer/globalvar.rs +++ b/lib/cretonne/src/legalizer/globalvar.rs @@ -10,8 +10,8 @@ use ir::{self, InstBuilder}; /// Expand a `global_addr` instruction according to the definition of the global variable. pub fn expand_global_addr(inst: ir::Inst, func: &mut ir::Function, _cfg: &mut ControlFlowGraph) { // Unpack the instruction. - let gv = match &func.dfg[inst] { - &ir::InstructionData::UnaryGlobalVar { opcode, global_var } => { + let gv = match func.dfg[inst] { + ir::InstructionData::UnaryGlobalVar { opcode, global_var } => { assert_eq!(opcode, ir::Opcode::GlobalAddr); global_var } diff --git a/lib/cretonne/src/legalizer/heap.rs b/lib/cretonne/src/legalizer/heap.rs index ac68044a4a..0a14f5f8ee 100644 --- a/lib/cretonne/src/legalizer/heap.rs +++ b/lib/cretonne/src/legalizer/heap.rs @@ -11,8 +11,8 @@ use ir::condcodes::IntCC; /// Expand a `heap_addr` instruction according to the definition of the heap. pub fn expand_heap_addr(inst: ir::Inst, func: &mut ir::Function, _cfg: &mut ControlFlowGraph) { // Unpack the instruction. - let (heap, offset, size) = match &func.dfg[inst] { - &ir::InstructionData::HeapAddr { + let (heap, offset, size) = match func.dfg[inst] { + ir::InstructionData::HeapAddr { opcode, heap, arg, diff --git a/lib/cretonne/src/verifier/mod.rs b/lib/cretonne/src/verifier/mod.rs index 47a419dafd..e6f9ea933e 100644 --- a/lib/cretonne/src/verifier/mod.rs +++ b/lib/cretonne/src/verifier/mod.rs @@ -169,7 +169,7 @@ impl<'a> Verifier<'a> { seen.insert(gv); let mut cur = gv; - while let &ir::GlobalVarData::Deref { base, .. } = &self.func.global_vars[cur] { + while let ir::GlobalVarData::Deref { base, .. } = self.func.global_vars[cur] { if seen.insert(base).is_some() { return err!(gv, "deref cycle: {}", DisplayList(seen.as_slice())); } diff --git a/lib/wasm/src/code_translator.rs b/lib/wasm/src/code_translator.rs index c500ba7c0c..4729ddbaa8 100644 --- a/lib/wasm/src/code_translator.rs +++ b/lib/wasm/src/code_translator.rs @@ -420,8 +420,8 @@ fn translate_operator( // and push a new control frame with a new ebb for the code after the if/then/else // At the end of the then clause we jump to the destination let i = control_stack.len() - 1; - let (destination, return_values, branch_inst) = match &control_stack[i] { - &ControlStackFrame::If { + let (destination, return_values, branch_inst) = match control_stack[i] { + ControlStackFrame::If { destination, ref return_values, branch_inst, @@ -1276,15 +1276,15 @@ fn translate_unreachable_operator( } else { // Encountering an real else means that the code in the else // clause is reachable again - let (branch_inst, original_stack_size) = - match &control_stack[control_stack.len() - 1] { - &ControlStackFrame::If { - branch_inst, - original_stack_size, - .. - } => (branch_inst, original_stack_size), - _ => panic!("should not happen"), - }; + let (branch_inst, original_stack_size) = match control_stack[control_stack.len() - + 1] { + ControlStackFrame::If { + branch_inst, + original_stack_size, + .. + } => (branch_inst, original_stack_size), + _ => panic!("should not happen"), + }; // We change the target of the branch instruction let else_ebb = builder.create_ebb(); builder.change_jump_destination(branch_inst, else_ebb);