rust/tests/fail/intrinsics/zero_fn_ptr.rs
2022-06-23 13:49:02 +00:00

6 lines
168 B
Rust

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