expect as borrowed

This commit is contained in:
J.Teeuwissen 2023-05-14 14:22:50 +02:00 committed by Folkert
parent 797da23f17
commit 99dae2fd80
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -648,12 +648,19 @@ fn insert_refcount_operations_stmt<'v, 'a>(
} => {
let new_remainder = insert_refcount_operations_stmt(arena, environment, remainder);
let newer_remainder = consume_and_insert_dec_stmts(
arena,
environment,
environment.borrowed_usages(lookups.iter().copied()),
new_remainder,
);
arena.alloc(Stmt::Expect {
condition: *condition,
region: *region,
lookups,
variables,
remainder: new_remainder,
remainder: newer_remainder,
})
}
Stmt::ExpectFx {
@ -665,12 +672,19 @@ fn insert_refcount_operations_stmt<'v, 'a>(
} => {
let new_remainder = insert_refcount_operations_stmt(arena, environment, remainder);
let newer_remainder = consume_and_insert_dec_stmts(
arena,
environment,
environment.borrowed_usages(lookups.iter().copied()),
new_remainder,
);
arena.alloc(Stmt::ExpectFx {
condition: *condition,
region: *region,
lookups,
variables,
remainder: new_remainder,
remainder: newer_remainder,
})
}
Stmt::Dbg {