From b90cf2300b0655bbda84053b63e147ad998b893f Mon Sep 17 00:00:00 2001 From: lyken Date: Thu, 15 Aug 2024 23:44:33 +0800 Subject: [PATCH] core/fix: add missing lifetime in gen_for* --- nac3core/src/codegen/stmt.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/nac3core/src/codegen/stmt.rs b/nac3core/src/codegen/stmt.rs index 4b2cf4e2..92d3d16e 100644 --- a/nac3core/src/codegen/stmt.rs +++ b/nac3core/src/codegen/stmt.rs @@ -638,8 +638,12 @@ where I: Clone, InitFn: FnOnce(&mut G, &mut CodeGenContext<'ctx, 'a>) -> Result, CondFn: FnOnce(&mut G, &mut CodeGenContext<'ctx, 'a>, I) -> Result, String>, - BodyFn: - FnOnce(&mut G, &mut CodeGenContext<'ctx, 'a>, BreakContinueHooks, I) -> Result<(), String>, + BodyFn: FnOnce( + &mut G, + &mut CodeGenContext<'ctx, 'a>, + BreakContinueHooks<'ctx>, + I, + ) -> Result<(), String>, UpdateFn: FnOnce(&mut G, &mut CodeGenContext<'ctx, 'a>, I) -> Result<(), String>, { let label = label.unwrap_or("for"); @@ -719,7 +723,7 @@ where BodyFn: FnOnce( &mut G, &mut CodeGenContext<'ctx, 'a>, - BreakContinueHooks, + BreakContinueHooks<'ctx>, IntValue<'ctx>, ) -> Result<(), String>, { @@ -799,7 +803,7 @@ where BodyFn: FnOnce( &mut G, &mut CodeGenContext<'ctx, 'a>, - BreakContinueHooks, + BreakContinueHooks<'ctx>, IntValue<'ctx>, ) -> Result<(), String>, {