Closed
Description
This was uncovered in #75172 / #78227.
struct PanicInDrop;
impl Drop for PanicInDrop {
fn drop(&mut self) { panic!("💥"); }
}
thread_local!(static X: PanicInDrop = PanicInDrop);
fn main() {
X.with(|_| ());
}
This fails with:
thread 'main' panicked at '💥', src/main.rs:4:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5