Skip to content

Commit 38612f5

Browse files
committed
Explicitly skip arguments.
1 parent 3c43b61 commit 38612f5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ impl<'tcx> crate::AnalysisDomain<'tcx> for MaybeStorageDead {
9797

9898
fn initialize_start_block(&self, body: &mir::Body<'tcx>, on_entry: &mut Self::Domain) {
9999
assert_eq!(body.local_decls.len(), self.always_live_locals.domain_size());
100+
// Do not iterate on return place and args, as they are trivially always live.
100101
for local in body.vars_and_temps_iter() {
101102
if !self.always_live_locals.contains(local) {
102103
on_entry.insert(local);

0 commit comments

Comments
 (0)