-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_use
lint, movedis_must_use_ty
to utils, addedis_must_use_fn
util function