mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
2f2664923b
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. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |