diff --git a/compiler/gen/src/llvm/build_list.rs b/compiler/gen/src/llvm/build_list.rs index f2bca58085..73cdd97e84 100644 --- a/compiler/gen/src/llvm/build_list.rs +++ b/compiler/gen/src/llvm/build_list.rs @@ -1319,6 +1319,7 @@ pub fn list_keep_if_help<'a, 'ctx, 'env>( } /// List.map : List before, (before -> after) -> List after +#[allow(clippy::too_many_arguments)] pub fn list_map<'a, 'ctx, 'env>( env: &Env<'a, 'ctx, 'env>, layout_ids: &mut LayoutIds<'a>, diff --git a/compiler/gen/src/llvm/build_str.rs b/compiler/gen/src/llvm/build_str.rs index 610e0cc90d..6b4a885331 100644 --- a/compiler/gen/src/llvm/build_str.rs +++ b/compiler/gen/src/llvm/build_str.rs @@ -143,13 +143,14 @@ fn zig_str_to_struct<'a, 'ctx, 'env>( let ret_type = BasicTypeEnum::StructType(collection(env.context, env.ptr_bytes)); - let foo = builder.build_alloca(zig_str_type, "zig_result"); + // a roundabout way of casting (LLVM does not accept a standard bitcast) + let allocation = builder.build_alloca(zig_str_type, "zig_result"); - builder.build_store(foo, zig_str); + builder.build_store(allocation, zig_str); let ptr3 = builder .build_bitcast( - foo, + allocation, env.context.i128_type().ptr_type(AddressSpace::Generic), "cast", )