Post

This should be upgraded to warn by default and promoted to rustc imo. Is it ever correct to want the other thing? (Still MaybeIncorrect fix because it can break existing code I guess)

I think it would be a code smell to do the other thing on purpose, but you could write correct code that did so if you really wanted to, and maybe someone has. Regardless, I agree that warning by default would make a lot of sense. Not sure how to make that happen, though.

For rustc, open a PR and nominate for lang. The most natural order would be if it were upgraded in clippy first. It isn't strictly necessary but gives confidence in the impl. If you face resistance to that, lang could weigh in and say we want this, assuming the rest of the team agrees with me.

0 reposts1 like

No replies yet.