rust/src/test/ui/consts/validate_never_arrays.rs

6 lines
151 B
Rust
Raw Normal View History

#![feature(const_raw_ptr_deref, never_type)]
const FOO: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) }; //~ ERROR undefined behavior
fn main() {}