rust/tests/fail/validity/invalid_fnptr_null.rs

6 lines
145 B
Rust
Raw Normal View History

2022-02-24 10:55:40 -05:00
#![allow(invalid_value)]
fn main() {
2022-02-24 19:41:11 -05:00
let _b: fn() = unsafe { std::mem::transmute(0usize) }; //~ ERROR encountered a null function pointer
2022-02-24 10:55:40 -05:00
}