-
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 negation to len_zero
lint to show more explicit message.
#4314
Conversation
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
tests/ui/escape_analysis.stderr
Outdated
@@ -1,22 +0,0 @@ | |||
error: local variable doesn't need to be boxed here |
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.
The issue with this test is fixed on the master branch. Please leave this file unchanged.
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.
@flip1995 Thanks for the review!! Ok!I will fixe that later
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.
@flip1995 I fixed it:)
293b0d7
to
2d467dc
Compare
Oh, now you have to update the |
@flip1995 Oh, my bad. I pushed updated |
Thanks! @bors r+ Side note: If your contribution fixes an issue, add "Fixes/Resolves/Closes" in front of the issue number, so the issue gets closed automatically. (Also in Clippy we require a "changelog: ..." line in the description). I added those for you, so this is just FYI and your next Clippy contribution 🎉 😉 |
📌 Commit ccc3257 has been approved by |
Add negation to `len_zero` lint to show more explicit message. Fixes #4304 I have updated the `len_zero` to show the required negation in case of like the below case. ``` fn main() { let v = vec![1]; if v.len() > 0 { } } ``` changelog: Clarify suggestion of `len_zero` lint.
☀️ Test successful - checks-travis, status-appveyor |
Fixes #4304 I have updated the
len_zero
to show the required negation in case of like the below case.changelog: Clarify suggestion of
len_zero
lint.