From f5b998cd9cdf3083bf0489839508ebbfe0158534 Mon Sep 17 00:00:00 2001 From: David Mak Date: Mon, 5 Aug 2024 16:11:58 +0800 Subject: [PATCH] core/codegen: Remove unnecessary mut from get_llvm*_type --- nac3core/src/codegen/expr.rs | 4 ++-- nac3core/src/codegen/mod.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nac3core/src/codegen/expr.rs b/nac3core/src/codegen/expr.rs index 66232d89d..de9c9f71c 100644 --- a/nac3core/src/codegen/expr.rs +++ b/nac3core/src/codegen/expr.rs @@ -201,7 +201,7 @@ impl<'ctx, 'a> CodeGenContext<'ctx, 'a> { /// See [`get_llvm_type`]. pub fn get_llvm_type( &mut self, - generator: &mut G, + generator: &G, ty: Type, ) -> BasicTypeEnum<'ctx> { get_llvm_type( @@ -218,7 +218,7 @@ impl<'ctx, 'a> CodeGenContext<'ctx, 'a> { /// See [`get_llvm_abi_type`]. pub fn get_llvm_abi_type( &mut self, - generator: &mut G, + generator: &G, ty: Type, ) -> BasicTypeEnum<'ctx> { get_llvm_abi_type( diff --git a/nac3core/src/codegen/mod.rs b/nac3core/src/codegen/mod.rs index 2f4a9ec52..2619f5e17 100644 --- a/nac3core/src/codegen/mod.rs +++ b/nac3core/src/codegen/mod.rs @@ -444,7 +444,7 @@ pub struct CodeGenTask { fn get_llvm_type<'ctx, G: CodeGenerator + ?Sized>( ctx: &'ctx Context, module: &Module<'ctx>, - generator: &mut G, + generator: &G, unifier: &mut Unifier, top_level: &TopLevelContext, type_cache: &mut HashMap>, @@ -569,7 +569,7 @@ fn get_llvm_type<'ctx, G: CodeGenerator + ?Sized>( fn get_llvm_abi_type<'ctx, G: CodeGenerator + ?Sized>( ctx: &'ctx Context, module: &Module<'ctx>, - generator: &mut G, + generator: &G, unifier: &mut Unifier, top_level: &TopLevelContext, type_cache: &mut HashMap>,