1 error: function pointer assumed to be nullable, even though it isn't
2 --> $DIR/fn_null_check.rs:13:8
4 LL | if (fn_ptr as *mut ()).is_null() {}
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 = help: try wrapping your function pointer type in `Option<T>` instead, and using `is_none` to check for null pointer value
8 = note: `-D clippy::fn-null-check` implied by `-D warnings`
10 error: function pointer assumed to be nullable, even though it isn't
11 --> $DIR/fn_null_check.rs:14:8
13 LL | if (fn_ptr as *const u8).is_null() {}
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16 = help: try wrapping your function pointer type in `Option<T>` instead, and using `is_none` to check for null pointer value
18 error: function pointer assumed to be nullable, even though it isn't
19 --> $DIR/fn_null_check.rs:15:8
21 LL | if (fn_ptr as *const ()) == std::ptr::null() {}
22 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24 = help: try wrapping your function pointer type in `Option<T>` instead, and using `is_none` to check for null pointer value
26 error: function pointer assumed to be nullable, even though it isn't
27 --> $DIR/fn_null_check.rs:16:8
29 LL | if (fn_ptr as *const ()) == (0 as *const ()) {}
30 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32 = help: try wrapping your function pointer type in `Option<T>` instead, and using `is_none` to check for null pointer value
34 error: function pointer assumed to be nullable, even though it isn't
35 --> $DIR/fn_null_check.rs:17:8
37 LL | if (fn_ptr as *const ()) == ZPTR {}
38 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40 = help: try wrapping your function pointer type in `Option<T>` instead, and using `is_none` to check for null pointer value
42 error: aborting due to 5 previous errors