-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Rename overlapping_patterns
lint
#78242
Rename overlapping_patterns
lint
#78242
Conversation
@rust-lang/lang: this renames The implementation itself looks fine. |
Nominating to discuss the name in the lang-team meeting. |
☔ The latest upstream changes (presumably #78334) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
cccf902
to
a856dd2
Compare
☔ The latest upstream changes (presumably #78430) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
a856dd2
to
1ee30f1
Compare
☔ The latest upstream changes (presumably #75534) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
1ee30f1
to
f453432
Compare
From watching the triage meeting it seems the reason for renaming the lint wasn't super clear, so I thought I'd clarify. The issue is that match x {
0..=10 => {} // Oops, probably meant to write `0..10`
10..=20 => {}
_ => {}
} Knowing only the name of the lint, one would expect it to lint may more things. Even knowing that it applies to ranges, one would expect it to lint for overlaps like the following, but it doesn't: match x {
0..10 => {}
5..15 => {}
_ => {}
} So it was proposed to rename it to |
Thanks for watching and commenting! I'd certainly forgotten what this was about.
I think that's a great summary, and I agree with niko's statement that a better name that other people like is good by me. So @rfcbot merge |
Team member @scottmcm has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
Yes, thanks for clarifying! And glad to know people watch the recordings. =) @rfcbot reviewed |
☔ The latest upstream changes (presumably #79243) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
f453432
to
c62df4b
Compare
☔ The latest upstream changes (presumably #79284) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
c62df4b
to
5afe60f
Compare
☔ The latest upstream changes (presumably #79523) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. The RFC will be merged soon. |
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.
Implementation looks good. Just a couple of suggestions about the diagnostics changes.
@@ -320,7 +318,8 @@ impl IntRange { | |||
), | |||
); | |||
} | |||
err.note("this is likely to be a mistake"); | |||
err.span_label(pcx.span, "... with this range"); |
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.
Ah, this didn't have the effect I hoped it would. I forget how vertical label ordering is determined: I guess by span location?
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.
I'm not sure, but I think it's only the tests that involve macros that are confusing. In normal cases the ranges will be on different lines of a match and the messages will be in the order we want them
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.
Yes, that's true. Not worth worrying about.
@bors r+ Thanks! |
📌 Commit 5b6c175 has been approved by |
…nts-lint, r=varkor Rename `overlapping_patterns` lint As discussed in rust-lang#65477. I also tweaked a few things along the way. r? `@varkor` `@rustbot` modify labels: +A-exhaustiveness-checking
…nts-lint, r=varkor Rename `overlapping_patterns` lint As discussed in rust-lang#65477. I also tweaked a few things along the way. r? ``@varkor`` ``@rustbot`` modify labels: +A-exhaustiveness-checking
…nts-lint, r=varkor Rename `overlapping_patterns` lint As discussed in rust-lang#65477. I also tweaked a few things along the way. r? ```@varkor``` ```@rustbot``` modify labels: +A-exhaustiveness-checking
☀️ Test successful - checks-actions |
…Simulacrum lint-docs: Warn on missing lint when documenting. In rust-lang#79522, I missed converting one of the errors to a warning, in the situation where a lint is missing. This was unearthed by the renaming of overlapping-patterns (rust-lang#78242). This will still be validated during the test phase.
As discussed in #65477. I also tweaked a few things along the way.
r? @varkor
@rustbot modify labels: +A-exhaustiveness-checking