gtk-rs / gtk-rs-core

Rust bindings for GNOME libraries
https://gtk-rs.org/gtk-rs-core
MIT License
272 stars 104 forks source link

glib-macros/properties: Allow structs with no properties #1370

Closed felinira closed 2 months ago

felinira commented 2 months ago

As discussed in matrix. The rationale would be that this is useful for refactoring. We unfortunately can't emit custom warnings inside property macros. Otherwise I would prefer if the macro emitted a helpful warning.

Right now the macro emits one unreachable expression warning at the macro site if the enum is empty. Does this make sense to keep or should I silence it as well?