Fix let_unit_value to lint when explicit unit type annotation is present
changelog: [let_unit_value]: Now lints when explicit unit type annotation is present
fixes rust-lang/rust-clippy#15957
This PR fixes the let_unit_value lint to trigger even when an explicit () type annotation is present.
:warning: Warning :warning:
- There are issue links (such as
#123) in the commit messages of the following commits. Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.- b2809e411a34738876961c4502165ead1915753b
r? clippy
@samueltardieu
Error markers should be identical to the other one used for testing this lint (
let_unit_value, notERROR).
Fixed, that's for pointing that out.
please don't use lengthy LLM generated messages for the PR description, this is tedious to read and brings little value.
Understood. Sorry for the excess. I've shortened the description to just the changelog entry, reference to issue number, and short description.
@Jarcho @samueltardieu @Urgau @blyxyas Could we please re-review the changes and consider merging?
Hmm I'm not sure if this change is beneficial. This code was already allowed and it raised this issue https://github.com/rust-lang/rust-clippy/issues/12017, maybe it's better to lose this as a false negative, than to annoy users when it could be an important component for type-ensurance.
Reminder, once the PR becomes ready for a review, use @rustbot ready.