fixed borrow/owned

This commit is contained in:
J.Teeuwissen 2023-04-15 14:55:40 +02:00
parent 6ece065504
commit 3c5a978bbe
No known key found for this signature in database
GPG key ID: DB5F7A1ED8D478AD

View file

@ -428,7 +428,7 @@ fn insert_inc_dec_operations_proc<'a, 'i>(
.iter()
.all(|(symbol, ownership)| {
// All symbols should be borrowed.
ownership.is_owned()
ownership.is_borrowed()
&& proc
.args
.iter()
@ -771,7 +771,9 @@ fn insert_refcount_operations_stmt<'v, 'a, 'i>(
let consumed_symbols = current_body_env
.symbols_ownership
.iter()
.filter_map(|(symbol, ownership)| ownership.is_owned().then_some(*symbol))
.filter_map(|(symbol, ownership)| {
ownership.is_borrowed().then_some(*symbol)
})
.collect::<MutSet<_>>();
consumed_symbols