diff options
| author | bors <bors@rust-lang.org> | 2025-04-14 07:07:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-04-14 07:07:54 +0000 |
| commit | 5961e5ba3daa20d98f549eb9029105ae50c13aed (patch) | |
| tree | 4ac1a50a6878c637f7dea0a76b02ba4f2fb79983 /compiler/rustc_mir_transform/src | |
| parent | f836ae4e663b6e8938096b8559e094d18361be55 (diff) | |
| parent | b06f38c2ab0f2f89938d81120db778857aaa4a38 (diff) | |
| download | rust-5961e5ba3daa20d98f549eb9029105ae50c13aed.tar.gz rust-5961e5ba3daa20d98f549eb9029105ae50c13aed.zip | |
Auto merge of #139781 - jhpratt:rollup-qadsjvb, r=jhpratt
Rollup of 9 pull requests
Successful merges:
- #138336 (Improve `-Z crate-attr` diagnostics)
- #139636 (Encode dep node edge count as u32 instead of usize)
- #139666 (cleanup `mir_borrowck`)
- #139695 (compiletest: consistently use `camino::{Utf8Path,Utf8PathBuf}` throughout)
- #139699 (Proactively update coroutine drop shim's phase to account for later passes applied during shim query)
- #139718 (enforce unsafe attributes in pre-2024 editions by default)
- #139722 (Move some things to rustc_type_ir)
- #139760 (UI tests: migrate remaining compile time `error-pattern`s to line annotations when possible)
- #139776 (Switch attrs to `diagnostic::on_unimplemented`)
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/coroutine.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_mir_transform/src/coroutine.rs b/compiler/rustc_mir_transform/src/coroutine.rs index 80c729d66b1..4405bd82410 100644 --- a/compiler/rustc_mir_transform/src/coroutine.rs +++ b/compiler/rustc_mir_transform/src/coroutine.rs @@ -1169,6 +1169,13 @@ fn create_coroutine_drop_shim<'tcx>( dump_mir(tcx, false, "coroutine_drop", &0, &body, |_, _| Ok(())); body.source.instance = drop_instance; + // Creating a coroutine drop shim happens on `Analysis(PostCleanup) -> Runtime(Initial)` + // but the pass manager doesn't update the phase of the coroutine drop shim. Update the + // phase of the drop shim so that later on when we run the pass manager on the shim, in + // the `mir_shims` query, we don't ICE on the intra-pass validation before we've updated + // the phase of the body from analysis. + body.phase = MirPhase::Runtime(RuntimePhase::Initial); + body } |
