Skip to content

Commit c2b7842

Browse files
authored
Rollup merge of #127625 - SkiFire13:revert-comment-deletion, r=workingjubilee
Revert accidental comment deletion This reverts an accidental comment deletion made in #113128 See also #113128 (comment)
2 parents ca576ea + d902179 commit c2b7842

File tree

1 file changed

+2
-0
lines changed
  • compiler/rustc_borrowck/src

1 file changed

+2
-0
lines changed

compiler/rustc_borrowck/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,8 @@ impl<'a, 'mir, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'mir, 'tcx, R>
821821
| TerminatorKind::Return
822822
| TerminatorKind::TailCall { .. }
823823
| TerminatorKind::CoroutineDrop => {
824+
// Returning from the function implicitly kills storage for all locals and statics.
825+
// Often, the storage will already have been killed by an explicit
824826
// StorageDead, but we don't always emit those (notably on unwind paths),
825827
// so this "extra check" serves as a kind of backup.
826828
let borrow_set = self.borrow_set.clone();

0 commit comments

Comments
 (0)