repl: fix lifetime problem with app_memory in Env

This commit is contained in:
Brian Carroll 2022-01-28 13:05:06 +00:00
parent 382ae948e1
commit 3e35880513
2 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ use super::from_memory::AppMemory;
struct Env<'a, 'env, M> {
arena: &'a Bump,
subs: &'env Subs,
app_memory: M,
app_memory: &'a M,
target_info: TargetInfo,
interns: &'env Interns,
home: ModuleId,
@ -51,7 +51,7 @@ pub unsafe fn jit_to_ast<'a, M: AppMemory>(
home: ModuleId,
subs: &'a Subs,
target_info: TargetInfo,
app_memory: M,
app_memory: &'a M,
) -> Result<Expr<'a>, ToAstProblem> {
let env = Env {
arena,

View File

@ -239,7 +239,7 @@ pub fn gen_and_eval<'a>(
home,
&subs,
target_info,
AppMemoryInternal,
&AppMemoryInternal,
)
};
let mut expr = roc_fmt::Buf::new_in(&arena);