-
Notifications
You must be signed in to change notification settings - Fork 13k
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
unused_patterns
lint
#54538
Comments
Here are some tips for how to update that lint. These aren't full mentoring notes but they might get you started. The lint itself is declared here: rust/src/librustc_lint/unused.rs Lines 258 to 262 in 3bc2ca7
The meat of it is found in the rust/src/librustc_lint/unused.rs Line 326 in 3bc2ca7
As you can see, it checks for various places where a lint would not be needed, such as in the body if an For patterns, I imagine we'll want to do something similar, but adding a That said, I think this is quite a bit harder than the stabilization itself. If the person who handles this issue wants to do it, seems great, but if they are not familiar with the compiler, I think we could leave it out from the first PR, and then move this to a distinct issue to be added at some later time. |
I can pick this up. The mentoring notes provide enough for me to get started. I will reach out if I need some help or clarification! |
@kleimkuhler Great! If you have any further problems, please don't hestitate to ping on Zulip or Discord. |
I started a thread on Zulip, for future reference. |
…erns-lint, r=nikomatsakis Closes rust-lang#54538: `unused_patterns` lint Closes rust-lang#54538 r? @nikomatsakis
Rollup of 11 pull requests Successful merges: - #54820 (Closes #54538: `unused_patterns` lint) - #54963 (Cleanup rustc/session) - #54991 (add test for #23189) - #55025 (Add missing lifetime fragment specifier to error message.) - #55047 (doc: make core::fmt::Error example more simple) - #55048 (Don't collect to vectors where unnecessary) - #55060 (clarify pointer add/sub function safety concerns) - #55062 (Make EvalContext::step public again) - #55066 (Fix incorrect link in println! documentation) - #55081 (Deduplicate tests) - #55088 (Update rustc documentation link) Failed merges: r? @ghost
As @scottmcm pointed out here, the
unused_parens
lints should be extended to also catch unused parentheses in patterns:Play
The text was updated successfully, but these errors were encountered: