about summary refs log tree commit diff
path: root/tests/ui/box/empty-alloc-deref-rvalue.rs
blob: 507a753467ac9c04a51f42c0c5b08b856b5ae0ae (plain)
1
2
3
4
5
6
7
8
9
10
//! 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(());
}