Ah, makes sense
Looks like it trips the lint, at least:
warning: `extern` block uses type `std::option::Option<std::ptr::NonNull<i32>>` which is not FFI-safe: enum has no representation hint
--> src/lib.rs:5:19
|
5 | pub fn bar(x: Option<NonNull<i32>>);
| ^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(improper_ctypes)] on by default
= help: consider adding a #[repr(...)] attribute to this enum
Its docs do say that "Option<NonNull<T>> has the same size as *mut T", though, so it’d almost work…
Ah, there’s an issue about it: