Add Expr::ErasedLoad

This commit is contained in:
Ayaz Hafiz 2023-07-02 11:48:21 -05:00
parent 2c838aa5c2
commit 283b9d53d6
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
11 changed files with 92 additions and 17 deletions

View file

@ -737,6 +737,14 @@ impl<'a> BorrowInfState<'a> {
self.own_var(*callee);
}
ErasedLoad { symbol, field: _ } => {
// if the extracted value is owned, the erasure is too
self.if_is_owned_then_own(*symbol, z);
// if the erasure is owned, so is the extracted value
self.if_is_owned_then_own(z, *symbol);
}
Reset { symbol: x, .. } | ResetRef { symbol: x, .. } => {
self.own_var(z);
self.own_var(*x);