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
This commit is contained in:
bors 2025-04-14 07:07:54 +00:00
commit 5961e5ba3d
152 changed files with 1818 additions and 1713 deletions

View file

@ -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
}