-
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
Match wild err arm improvements #5034
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. extracting this visitor into utils would be great!
cc6106e
to
9a0d942
Compare
☔ The latest upstream changes (presumably #5040) made this pull request unmergeable. Please resolve the merge conflicts. |
9a0d942
to
44fb8b5
Compare
Thanks! @bors r+ |
📌 Commit 44fb8b5 has been approved by |
Match wild err arm improvements This lint should trigger on other identifiers which have `_` prefix (such as `_e`) and only if they are unused in the panic block. _Note_: the `is_unused` function is greatly inspired from `pat_is_wild` function in [loops lints](https://github.com/rust-lang/rust-clippy/blob/43ac9416d935942d6c7d2b2e0c876c551652c4ec/clippy_lints/src/loops.rs#L1689). I've been considering doing some refactoring, maybe in utils. Maybe this PR or a new one. What do you think ? fixes #5024 changelog: none
☀️ Test successful - checks-travis, status-appveyor |
This lint should trigger on other identifiers which have
_
prefix (such as_e
) and only if they are unused in the panic block.Note: the
is_unused
function is greatly inspired frompat_is_wild
function in loops lints.I've been considering doing some refactoring, maybe in utils. Maybe this PR or a new one. What do you think ?
fixes #5024
changelog: none