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.23k stars 679 forks source link

Support blocklisting `__BindgenBitfieldUnit` #2836

Closed ian-h-chamberlain closed 2 weeks ago

ian-h-chamberlain commented 1 month ago

Closes #2835

Simply skip emitting it if the list of blocklisted types/items matches its name.

Also add a test that verifies blocklisting anonymous types by _bindgen_ty_* works as expected – which could be used to prevent similar conflicts between generated type names for anonymous types.