rust/tests/ui/box/empty-alloc-deref-rvalue.rs
2025-06-11 17:49:03 +05:00

11 lines
258 B
Rust

//! Smoke test: dereferencing boxed zero-sized types (ZSTs) should not crash.
//!
//! Originally a regression test of github.com/rust-lang/rust/issues/13360
//! but repurposed for a smoke test.
//@ run-pass
pub fn main() {
let _: () = *Box::new(());
}