]> git.lizzy.rs Git - rust.git/blobdiff - src/allocator.rs
Rollup merge of #81618 - bjorn3:sync_cg_clif-2021-02-01, r=bjorn3
[rust.git] / src / allocator.rs
index 0735ad6f83299a1a6eb2721455351475d3b03820..6c5916550ff639f52a99c14bd8ce34c0321f4da0 100644 (file)
@@ -123,7 +123,7 @@ fn codegen_inner(
         .unwrap();
 
     let mut ctx = Context::new();
-    ctx.func = Function::with_name_signature(ExternalName::user(0, 0), sig.clone());
+    ctx.func = Function::with_name_signature(ExternalName::user(0, 0), sig);
     {
         let mut func_ctx = FunctionBuilderContext::new();
         let mut bcx = FunctionBuilder::new(&mut ctx.func, &mut func_ctx);
@@ -131,7 +131,7 @@ fn codegen_inner(
         let block = bcx.create_block();
         bcx.switch_to_block(block);
         let args = (&[usize_ty, usize_ty])
-            .into_iter()
+            .iter()
             .map(|&ty| bcx.append_block_param(block, ty))
             .collect::<Vec<Value>>();