On Sat, Jun 28, 2025 at 12:30 PM Onur work@onurozkan.dev wrote:
It doesn't seem to be the same reason. I rebased over c6af9a1191d042839e56abff69e8b0302d117988 (the exact commit where that lint was added) but still Clippy did not complain about it on the MSRV. So it was either a leftover, or there is a version between 1.78 and the current stable where Clippy did complain. I can dig into it more during the week if you would like.
Are you sure? The lint is actually disabled, as I mention in 5e7c9b84ad08.
From a quick test, I enabled it in that file, and I get the warning.
Thus it seems to me Clippy would still complain about it just fine.
It doesn't mean we shouldn't remove it, though.
IMO, we should require people to add a comment explaining the reason for adding these lint rules to the codebase. It would make both reading and modifying the code much simpler and clearer.
Do you mean using the lint reasons feature? IIRC we discussed at some point doing that when the feature was added (we enabled it for the `expect` side of things).
For non-obvious cases or uncommon lints, it would be definitely nice (a comment is also OK). I am not sure if it is worth enforcing it for every single case, though.
It would be nice if `clippy::allow_attributes_without_reason` could be enabled just for `allow`, or ignore it for certain lints.
Cheers, Miguel