Re: [PATCH] rust: clean Rust 1.86.0 new `clippy::needless_continue` cases
From: Tamir Duberstein
Date: Wed Apr 02 2025 - 12:50:21 EST
On Wed, Apr 2, 2025 at 11:27 AM Miguel Ojeda
<miguel.ojeda.sandonis@xxxxxxxxx> wrote:
>
> On Wed, Apr 2, 2025 at 3:59 PM Tamir Duberstein <tamird@xxxxxxxxx> wrote:
> >
> > Rather than disabling globally, why not `#[expect]` these instances
> > with a reason?
>
> That is an option sometimes, yeah, but in this case, writing those
> lines is also a burden -- one that is, I would say, worse than just
> using `()`.
>
> It would also need to be `allow` here, not `expect`, because older
> versions do not complain, which makes it even worse...
👍
> So it is all about what a lint gives us in exchange of those false
> positives, and about how much time people would need to spend on it. I
> have always supported adding lints (I think I added this one, long
> ago, in fact), but I don't want that we overdo it either, so I am
> happy disabling it if it is going to be too painful.
The counterfactual is hard to prove - you don't know what true
positives the lint would catch. In my opinion disabling lints is
risking throwing the baby out with the bathwater.