mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
8beec0111d
Add regression test for dead code elimination with drop + panic Add a codegen test for rust-lang/rust#114532. The bug was that dead code elimination failed when a `Drop` impl contained a `panic!` and a potentially-panicking external function was called after the value was created. This was fixed since 1.82 but no regression test was added. The test verifies that `foo()` compiles to just a call to `unknown()` + `ret void`, with no panic or panicking call in the function body. Closes rust-lang/rust#114532