diff options
| author | Giacomo Stevanato <giaco.stevanato@gmail.com> | 2024-07-11 22:38:34 +0200 |
|---|---|---|
| committer | Giacomo Stevanato <giaco.stevanato@gmail.com> | 2024-07-11 22:38:34 +0200 |
| commit | d9021791eb097ae80bb1f1dd691e7e47c8e16f59 (patch) | |
| tree | b25d6830dfef101a9e925217df6cf73b88e683ab | |
| parent | bcf1f6db4594ae6132378b179a30cdb3599a863d (diff) | |
| download | rust-d9021791eb097ae80bb1f1dd691e7e47c8e16f59.tar.gz rust-d9021791eb097ae80bb1f1dd691e7e47c8e16f59.zip | |
Revert accidental comment deletion
| -rw-r--r-- | compiler/rustc_borrowck/src/lib.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_borrowck/src/lib.rs b/compiler/rustc_borrowck/src/lib.rs index d258c68b959..9ad941dabbe 100644 --- a/compiler/rustc_borrowck/src/lib.rs +++ b/compiler/rustc_borrowck/src/lib.rs @@ -821,6 +821,8 @@ impl<'a, 'mir, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'mir, 'tcx, R> | TerminatorKind::Return | TerminatorKind::TailCall { .. } | TerminatorKind::CoroutineDrop => { + // Returning from the function implicitly kills storage for all locals and statics. + // Often, the storage will already have been killed by an explicit // StorageDead, but we don't always emit those (notably on unwind paths), // so this "extra check" serves as a kind of backup. let borrow_set = self.borrow_set.clone(); |
