]> 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 2862a372dfe0196f57a7ed2d7d32a73aad645b02..6c5916550ff639f52a99c14bd8ce34c0321f4da0 100644 (file)
@@ -9,7 +9,7 @@
 /// Returns whether an allocator shim was created
 pub(crate) fn codegen(
     tcx: TyCtxt<'_>,
-    module: &mut Module<impl Backend + 'static>,
+    module: &mut impl Module,
     unwind_context: &mut UnwindContext<'_>,
 ) -> bool {
     let any_dynamic_crate = tcx.dependency_formats(LOCAL_CRATE).iter().any(|(_, list)| {
@@ -27,7 +27,7 @@ pub(crate) fn codegen(
 }
 
 fn codegen_inner(
-    module: &mut Module<impl Backend + 'static>,
+    module: &mut impl Module,
     unwind_context: &mut UnwindContext<'_>,
     kind: AllocatorKind,
 ) {
@@ -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>>();