rust/tests/fail/intrinsics/zero_fn_ptr.rs

6 lines
168 B
Rust
Raw Normal View History

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