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 691 forks source link

Allow custom derives on new-type alias #2780

Closed arctic-alpaca closed 6 months ago

arctic-alpaca commented 6 months ago

This allows custom derives on new-type aliases which brings them in line with other structs and enums regarding derive callbacks.

The implementation was mostly copied from https://github.com/rust-lang/rust-bindgen/pull/2117.