Add let_underscore_must_use lint#4823
Conversation
|
ping @flip1995 , is this fail my mistake or not? |
|
Toolstate says clippy master is currently broken, so it's probably not your mistake. |
|
Yeah this is Manishearth/compiletest-rs#202 |
flip1995
left a comment
There was a problem hiding this comment.
LGTM overall. Two small changes.
clippy_lints/src/let_underscore.rs
Outdated
| /// let _ = f().is_ok(); | ||
| /// ``` | ||
| pub LET_UNDERSCORE_MUST_USE, | ||
| pedantic, |
There was a problem hiding this comment.
| pedantic, | |
| restriction, |
This was requested as a restriction lint, and I agree that it should be a restriction lint.
| } | ||
|
|
||
| fn main() { | ||
| let _ = f(); |
There was a problem hiding this comment.
Please add a test for a function, that is not must_use and doesn't have a must_use type.
|
☔ The latest upstream changes (presumably #4839) made this pull request unmergeable. Please resolve the merge conflicts. |
fe06d5b to
afb3f62
Compare
|
Thanks @bors r+ |
|
📌 Commit afb3f62 has been approved by |
Add `let_underscore_must_use` lint changelog: closes #4812 , added a new `let_underscore_must_use` lint, moved `is_must_use_ty` to utils, added `is_must_use_fn` util function
|
💔 Test failed - status-appveyor |
|
|
afb3f62 to
eaa266c
Compare
|
☔ The latest upstream changes (presumably #4930) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Sorry for my absence. Can you rebase this, so we can merge this? |
actually add files update lints change to pedantic
eaa266c to
a310cb2
Compare
|
Done |
|
@bors r=flip1995 |
|
📌 Commit a310cb2 has been approved by |
Add `let_underscore_must_use` lint changelog: closes #4812 , added a new `let_underscore_must_use` lint, moved `is_must_use_ty` to utils, added `is_must_use_fn` util function
|
☀️ Test successful - checks-travis, status-appveyor |
changelog: closes #4812 , added a new
let_underscore_must_uselint, movedis_must_use_tyto utils, addedis_must_use_fnutil function