[go: up one dir, main page]

ghost 0.1.11

Define your own PhantomData
Documentation
error: `extern` fn uses type `MyPhantom<i32>`, which is not FFI-safe
 --> tests/ui/ffi.rs:8:39
  |
8 | pub extern "C" fn extern_fn(_phantom: MyPhantom<i32>) {}
  |                                       ^^^^^^^^^^^^^^ not FFI-safe
  |
  = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
  = note: enum has no representation hint
note: the type is defined here
 --> tests/ui/ffi.rs:5:1
  |
5 | #[phantom]
  | ^^^^^^^^^^
note: the lint level is defined here
 --> tests/ui/ffi.rs:1:9
  |
1 | #![deny(improper_ctypes_definitions)]
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  = note: this error originates in the attribute macro `phantom` (in Nightly builds, run with -Z macro-backtrace for more info)