rust/tests/fail/validity/invalid_fnptr_null.rs
2022-07-11 11:48:56 +00:00

6 lines
146 B
Rust

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