/// 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)| {
}
fn codegen_inner(
- module: &mut Module<impl Backend + 'static>,
+ module: &mut impl Module,
unwind_context: &mut UnwindContext<'_>,
kind: AllocatorKind,
) {
.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);
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>>();