diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-11-18 15:54:50 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-11-26 11:23:40 +1100 |
| commit | 1914dbe69465132a545fbc4cd0400a02a56a8a77 (patch) | |
| tree | d804b2f2c1249d9f24d68ff2592b43e5cf80f4db /compiler/rustc_mir_dataflow | |
| parent | dae019dc9dd99ca092da03929406423d0527cfbb (diff) | |
| download | rust-1914dbe69465132a545fbc4cd0400a02a56a8a77.tar.gz rust-1914dbe69465132a545fbc4cd0400a02a56a8a77.zip | |
Tweak `MaybeBorrowedLocals::transfer_function` usage.
In `MaybeRequiresStorage::apply_before_statement_effect`, call `transfer_function` directly, as is already done in `MaybeRequiresStorage::apply_before_terminator_effect`. This makes it clear that the operation doesn't rely on the `MaybeBorrowedLocals` results.
Diffstat (limited to 'compiler/rustc_mir_dataflow')
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs b/compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs index 30992f38480..a6a4f849720 100644 --- a/compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs +++ b/compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs @@ -135,7 +135,7 @@ impl<'tcx> Analysis<'tcx> for MaybeRequiresStorage<'_, 'tcx> { loc: Location, ) { // If a place is borrowed in a statement, it needs storage for that statement. - self.borrowed_locals.mut_analysis().apply_statement_effect(trans, stmt, loc); + MaybeBorrowedLocals::transfer_function(trans).visit_statement(stmt, loc); match &stmt.kind { StatementKind::StorageDead(l) => trans.kill(*l), |
