Files
rust/tests/ui/box/empty-alloc-deref-rvalue.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
258 B
Rust
Raw Normal View History

2025-06-09 01:39:32 +05:00
//! 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(());
}