diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2023-12-10 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2023-12-11 23:11:20 +0100 |
| commit | eaaa290dbc3e6ceee7f4287b8b855b4c6d61d458 (patch) | |
| tree | 82ed1320b84becffcb5387d0f18685aba7069f9f | |
| parent | ef1831a21fede46bd7bd2d895fb82c194c0d7304 (diff) | |
| download | rust-eaaa290dbc3e6ceee7f4287b8b855b4c6d61d458.tar.gz rust-eaaa290dbc3e6ceee7f4287b8b855b4c6d61d458.zip | |
Remove redundant special case for resume argument
The special case is subsumed by the check for always live locals that follows it.
| -rw-r--r-- | compiler/rustc_mir_transform/src/coroutine.rs | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/compiler/rustc_mir_transform/src/coroutine.rs b/compiler/rustc_mir_transform/src/coroutine.rs index c4f295d69f8..d7dd44af7d2 100644 --- a/compiler/rustc_mir_transform/src/coroutine.rs +++ b/compiler/rustc_mir_transform/src/coroutine.rs @@ -1510,13 +1510,6 @@ fn create_cases<'tcx>( // Create StorageLive instructions for locals with live storage for i in 0..(body.local_decls.len()) { - if i == 2 { - // The resume argument is live on function entry. Don't insert a - // `StorageLive`, or the following `Assign` will read from uninitialized - // memory. - continue; - } - let l = Local::new(i); let needs_storage_live = point.storage_liveness.contains(l) && !transform.remap.contains_key(&l) |
