Closed lkolbly closed 3 years ago
Hey sorry for missing the review here!
I'd rather like #56 to be implemented rather than silencing all warnings as warnings are actually a feature, even for generated code.
E.g. a user can take those warnings and add the #[skip(..)]
attributes where needed to reduce code bloat. If warnings were not in place the user would not be notified about the potential code bloat.
Yeah, code bloat is a problem, and although LTO should ideally eliminate it from the binary it still slows down compilation. The getters and setters already have allow(dead_code)
set on them, so this PR just matches that.
The getters and setters already have allow(dead_code) set on them, so this PR just matches that.
IIRC only some of the setters and getters do have #[allow(dead_code)]
on them. Enough to not have duplicate warnings, so only ever one of the many generated getters is warned about for the entirety of the getters.
Hm, okay, I'd buy that. I'll close this PR then.
Adds a bunch more dead_code warnings.
With this playground:
I get no warnings.
This may affect #56, since it seemed like the issue there was more about silencing warnings than reducing generated code. (I won't say the magic words to make it auto-close, though)