servo / pathfinder

A fast, practical GPU rasterizer for fonts and vector graphics
Apache License 2.0
3.56k stars 198 forks source link

pathfinder_simd vector types cause FFI warnings with current nightly #451

Open berkus opened 3 years ago

berkus commented 3 years ago
warning: `extern` block uses type `float32x2_t`, which is not FFI-safe
   --> /..../pathfinder/simd/src/arm/mod.rs:865:22
    |
865 |     fn fabs_v2f32(a: float32x2_t) -> float32x2_t;
    |                      ^^^^^^^^^^^ not FFI-safe
    |
    = note: `#[warn(improper_ctypes)]` on by default
    = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
    = note: this struct has unspecified layout

I believe #[repr(transparent)] is the right attribute here.