about summary refs log tree commit diff
path: root/compiler/rustc_mir_dataflow/src/impls
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2023-04-26 18:40:10 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2023-05-09 17:59:35 +0000
commit38612f5ec7a464709f2dabde4edb843695ec84b2 (patch)
tree1652b8c13e14fd1ab48e2d6ac259675ad6277960 /compiler/rustc_mir_dataflow/src/impls
parent3c43b61b870add2daddbd8e480477e5a8aa409c2 (diff)
downloadrust-38612f5ec7a464709f2dabde4edb843695ec84b2.tar.gz
rust-38612f5ec7a464709f2dabde4edb843695ec84b2.zip
Explicitly skip arguments.
Diffstat (limited to 'compiler/rustc_mir_dataflow/src/impls')
-rw-r--r--compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs b/compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs
index 9656148581f..463ce083a64 100644
--- a/compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs
+++ b/compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs
@@ -97,6 +97,7 @@ impl<'tcx> crate::AnalysisDomain<'tcx> for MaybeStorageDead {
 
     fn initialize_start_block(&self, body: &mir::Body<'tcx>, on_entry: &mut Self::Domain) {
         assert_eq!(body.local_decls.len(), self.always_live_locals.domain_size());
+        // Do not iterate on return place and args, as they are trivially always live.
         for local in body.vars_and_temps_iter() {
             if !self.always_live_locals.contains(local) {
                 on_entry.insert(local);