Structure record stack rewinds as scope guards and make reserve unsafe

This commit is contained in:
Dennis Kobert
2026-08-28 18:02:50 +00:00
parent e5b910f840
commit f4d37524c8
15 changed files with 187 additions and 169 deletions
+2 -2
View File
@@ -216,8 +216,8 @@ mod test {
}
fn scope_fixture<'a>(generations: &'a [(SourceId, u64)], arena: &'a Arena) -> EvalScope<'a> {
stack::reserve(1 << 12);
EvalScope::new(Some(0.5), None, None, generations, arena)
// SAFETY: between evaluations, nothing served on the stack is live.
unsafe { stack::reserve(1 << 12); } EvalScope::new(Some(0.5), None, None, generations, arena)
}
struct VectorRows {