Interpretation of lint "Known problems"

If clippy suggests something that breaks the code (not talking about introducing a subtle bug, but rather introduces a hard compilation error), should such cases always be reported?

I'm asking because sometimes the lint's "Known problems" section hints that the lint may have blind spots, which I have interpreted as WONTFIX -- but is that accurate?

I couldn't find any info on this in the development guide, but I don't think you should interpret this as WONTFIX. The point of the known problems section, as I understand it, is to inform you as a user of the lint of situations where the lint might give you bad advice, to avoid sending you down a rabbit hole of trying to figure out what the bad advice means; it doesn't mean that the lint cannot be improved.

And even then, the presence of some known problem doesn't mean that you shouldn’t report other, unknown problems.

And, avoiding syntax errors in suggestions is generally a much easier problem to fix than making the lint detect all the situations it ideally should and none of the situations it shouldn’t.

You should probably report the bug you found, and label it with I-suggestion-causes-error — presuming it isn't already reported, of course.

4 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.