lint against repeated repr attributes#157036
Conversation
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
Wearing my lang hat but not speaking as team consensus (since we've not talked about it): I think you should start with the "obviously good" version, and we can do future PRs later to expand it or to update severity. Concretely, thus, I'd say it should be a warning (because if it's inert it doesn't need to be deny) when you have a clearly-unnecessary one that wasn't emitted from a macro, or something like that. (Our bar in the compiler for deny-by-default is pretty high. My personal heuristic is whether it's worth running your unit tests despite the warning, and an inert extra attribute doesn't need to block that.) We can then look at impacts and ratchet it up over time or over an edition, but those decisions can be made later and don't need to block you making a useful lint in the meantime. I'm a bad reviewer for lint stuff code-wise, though, so let's try |
|
+1 to what @scottmcm said on how best to approach this. |

fixes #156029 by adding a lint against repeated repr attributes.
todo for the draft before marking as ready:
@future_incompatible = FutureIncompatibleInfopart of thedeclare_lint!macro.r? scottmcm