mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-28 19:27:30 +03:00
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.
This commit is contained in:
@@ -135,7 +135,7 @@ fn apply_before_statement_effect(
|
||||
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),
|
||||
|
||||
Reference in New Issue
Block a user