rust/tests/fail/intrinsics/zero_fn_ptr.rs
2022-06-01 10:53:38 -04:00

7 lines
171 B
Rust

// error-pattern: attempted to zero-initialize type `fn()`, which is invalid
#[allow(deprecated, invalid_value)]
fn main() {
unsafe { std::mem::zeroed::<fn()>() };
}