avoid bloating parse expr size

This commit is contained in:
Brendan Hansknecht 2023-12-01 22:35:54 -08:00
parent d2a3caacbb
commit 5e8974177c
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
7 changed files with 14 additions and 12 deletions

View file

@ -660,15 +660,17 @@ pub fn desugar_expr<'a>(
// |> LowLevelDbg
arena.alloc(Loc {
value: LowLevelDbg(
arena.alloc(format!("{}:{}", module_path, line_col.line)),
arena.alloc(dbg_src),
arena.alloc((
&*arena.alloc_str(&format!("{}:{}", module_path, line_col.line)),
&*arena.alloc_str(dbg_src),
)),
dbg_str,
desugared_continuation,
),
region: loc_expr.region,
})
}
LowLevelDbg(_, _, _, _) => unreachable!("Only exists after desugaring"),
LowLevelDbg(_, _, _) => unreachable!("Only exists after desugaring"),
}
}