gtk-rs / gir

Tool to generate rust bindings and user API for glib-based libraries
https://gtk-rs.org/gir/book/
MIT License
225 stars 98 forks source link

Should not implement `Default` if there is a function called `default` #1543

Open zecakeh opened 5 months ago

zecakeh commented 5 months ago

Currently it is not possible to generate a builder type without also generating the Default implementation.

That produces cases like libspelling#1, where the type has two different functions called default, that don't do the same thing.

It could be done either via a config option to disable the generation of Default with the builder type, or by detecting automatically if there is a function called default.