Skip to content

Commit 6c60abf

Browse files
committed
Remove redundant special case for resume argument
The special case is subsumed by the check for always live locals that follows it.
1 parent 59188cb commit 6c60abf

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

compiler/rustc_mir_transform/src/coroutine.rs

-7
Original file line numberDiff line numberDiff line change
@@ -1512,13 +1512,6 @@ fn create_cases<'tcx>(
15121512

15131513
// Create StorageLive instructions for locals with live storage
15141514
for i in 0..(body.local_decls.len()) {
1515-
if i == 2 {
1516-
// The resume argument is live on function entry. Don't insert a
1517-
// `StorageLive`, or the following `Assign` will read from uninitialized
1518-
// memory.
1519-
continue;
1520-
}
1521-
15221515
let l = Local::new(i);
15231516
let needs_storage_live = point.storage_liveness.contains(l)
15241517
&& !transform.remap.contains_key(&l)

0 commit comments

Comments
 (0)