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

6 lines
145 B
Rust

#![allow(invalid_value)]
fn main() {
let _b: fn() = unsafe { std::mem::transmute(0usize) }; //~ ERROR encountered a null function pointer
}