Skip to content

Commit eaaa290

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 ef1831a commit eaaa290

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
@@ -1510,13 +1510,6 @@ fn create_cases<'tcx>(
15101510

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

0 commit comments

Comments
 (0)