2022-12-29 13:28:34 +00:00
|
|
|
error: function pointer assumed to be nullable, even though it isn't
|
2023-07-02 12:35:19 +00:00
|
|
|
--> $DIR/fn_null_check.rs:14:8
|
2022-12-29 13:28:34 +00:00
|
|
|
|
|
|
|
|
LL | if (fn_ptr as *mut ()).is_null() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: try wrapping your function pointer type in `Option<T>` instead, and using `is_none` to check for null pointer value
|
|
|
|
= note: `-D clippy::fn-null-check` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: function pointer assumed to be nullable, even though it isn't
|
2023-07-02 12:35:19 +00:00
|
|
|
--> $DIR/fn_null_check.rs:15:8
|
2022-12-29 13:28:34 +00:00
|
|
|
|
|
|
|
|
LL | if (fn_ptr as *const u8).is_null() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: try wrapping your function pointer type in `Option<T>` instead, and using `is_none` to check for null pointer value
|
|
|
|
|
|
|
|
error: function pointer assumed to be nullable, even though it isn't
|
2023-07-02 12:35:19 +00:00
|
|
|
--> $DIR/fn_null_check.rs:16:8
|
2022-12-29 13:28:34 +00:00
|
|
|
|
|
|
|
|
LL | if (fn_ptr as *const ()) == std::ptr::null() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: try wrapping your function pointer type in `Option<T>` instead, and using `is_none` to check for null pointer value
|
|
|
|
|
|
|
|
error: function pointer assumed to be nullable, even though it isn't
|
2023-07-02 12:35:19 +00:00
|
|
|
--> $DIR/fn_null_check.rs:17:8
|
2022-12-29 13:28:34 +00:00
|
|
|
|
|
|
|
|
LL | if (fn_ptr as *const ()) == (0 as *const ()) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: try wrapping your function pointer type in `Option<T>` instead, and using `is_none` to check for null pointer value
|
|
|
|
|
|
|
|
error: function pointer assumed to be nullable, even though it isn't
|
2023-07-02 12:35:19 +00:00
|
|
|
--> $DIR/fn_null_check.rs:18:8
|
2022-12-29 13:28:34 +00:00
|
|
|
|
|
|
|
|
LL | if (fn_ptr as *const ()) == ZPTR {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: try wrapping your function pointer type in `Option<T>` instead, and using `is_none` to check for null pointer value
|
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
|
|
|
|