| @@ -821,6 +821,8 @@ impl<'a, 'mir, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'mir, 'tcx, R> |
|
|
| 821 |
821 |
| TerminatorKind::Return |
| 822 |
822 |
| TerminatorKind::TailCall { .. } |
| 823 |
823 |
| 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 |
| 824 |
826 |
// StorageDead, but we don't always emit those (notably on unwind paths), |
| 825 |
827 |
// so this "extra check" serves as a kind of backup. |
| 826 |
828 |
let borrow_set = self.borrow_set.clone(); |