Drop Elaboration debug-ICEs when `SimplifyCfg` is disabled
Open
@Catskhi is already working on this.
Since Aug 23, 2026.
A-mir-opt
I-ICE
requires-debug-assertions
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
https://github.com/rust-lang/rust/pull/160524#issuecomment-5237043839
When compiling the following with debug assertions:
// rustc ice.rs -Zmir-enable-passes=-SimplifyCfg-initial,-SimplifyCfg-promote-consts,-SimplifyCfg-post-analysis
fn mir_drop<T>(_place: T) {
panic!()
}
fn main() {
mir_drop(());
}
We get an ICE in dataflow during drop elaboration:
thread 'rustc' panicked at compiler/rustc_mir_dataflow/src/framework/cursor.rs:120:9:
assertion failed: self.reachable_blocks.contains(block)
Unsure if this is an issue in practice, but there does seem to be some implicit dependencies between passes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.