rust-lang / rust-bindgen

Automatically generates Rust FFI bindings to C (and some C++) libraries.
https://rust-lang.github.io/rust-bindgen/
BSD 3-Clause "New" or "Revised" License
4.39k stars 690 forks source link

bindgen doesn't like mozilla::HashSet / mozilla::HashMap in Linux32 #1547

Open birtles opened 5 years ago

birtles commented 5 years ago

See log:

https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=9bdd75e358d19acb969e38572e1eeee810313104&selectedJob=238316628

Specifically we get:

error[E0605]: non-primitive cast: [u32; 2] as u64

/cc @emilio

emilio commented 5 years ago

Ah, so this is bitfields-related, and only on Linux32. These are the bitfields that fail to compile:

https://searchfox.org/mozilla-central/rev/8e0ea968308dd692ba5394b14e584234acf7d4ca/mfbt/HashTable.h#1534