Skip to content

Commit 1914dbe

Browse files
committed
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.
1 parent dae019d commit 1914dbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ impl<'tcx> Analysis<'tcx> for MaybeRequiresStorage<'_, 'tcx> {
135135
loc: Location,
136136
) {
137137
// If a place is borrowed in a statement, it needs storage for that statement.
138-
self.borrowed_locals.mut_analysis().apply_statement_effect(trans, stmt, loc);
138+
MaybeBorrowedLocals::transfer_function(trans).visit_statement(stmt, loc);
139139

140140
match &stmt.kind {
141141
StatementKind::StorageDead(l) => trans.kill(*l),

0 commit comments

Comments
 (0)