rust/compiler/rustc_mir_transform
Matthias Krüger 2f2664923b
Rollup merge of #102778 - nbdd0121:mir, r=tmiasko
Fix MIR inlining of asm_unwind

The MIR inlining currently doesn't handle inline asm's unwind edge correctly.

This code will cause ICE:
```rust
struct D;

impl Drop for D {
    fn drop(&mut self) {}
}

#[inline(always)]
fn foo() {
    let _d = D;
    unsafe { std::arch::asm!("", options(may_unwind)) };
}

pub fn main() {
    foo();
}
```

This PR fixes this issue. I also take the opportunity to extract common code into a method.
2022-10-08 14:38:19 +02:00
..
src Rollup merge of #102778 - nbdd0121:mir, r=tmiasko 2022-10-08 14:38:19 +02:00
Cargo.toml Remove from compiler/ crates 2022-09-29 16:49:04 +09:00