-
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
Feature gate the non_exhaustive_omitted_patterns lint #89428
Conversation
r? @oli-obk (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
An, even more, succinct error report:
|
☔ The latest upstream changes (presumably #89549) made this pull request unmergeable. Please resolve the merge conflicts. |
r? @Nadrieril |
Ok, I created the tracking issue: #89554 |
8d03f8a
to
8cf27f5
Compare
Sweet thanks!! I rebased and added the tracking issue number. Should I change the name in the PR? Edit: I realize now that you just meant the feature, not the actual attribute 🤦. |
Yes please |
This comment has been minimized.
This comment has been minimized.
Haha so many checks :D Seems like you also need to rename a test file |
Also, please squash your commits once CI is passing :) |
c583d3c
to
6e6db92
Compare
squashed Thanks for the help everybody!!! |
This comment has been minimized.
This comment has been minimized.
6e6db92
to
0836bfc
Compare
This comment has been minimized.
This comment has been minimized.
fa71b08
to
06f75f0
Compare
This comment has been minimized.
This comment has been minimized.
06f75f0
to
320f3e5
Compare
src/test/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs
Outdated
Show resolved
Hide resolved
☔ The latest upstream changes (presumably #89629) made this pull request unmergeable. Please resolve the merge conflicts. |
320f3e5
to
b7df3cc
Compare
This comment has been minimized.
This comment has been minimized.
b7df3cc
to
5f2767f
Compare
LGTM! @camelid unless you have any more comments, r=me |
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.
After fixing the tracking issue declaration and squashing, r=Nadrieril,camelid
. Thanks for doing this follow-up feature-gating!
compiler/rustc_feature/src/active.rs
Outdated
@@ -678,6 +678,9 @@ declare_features! ( | |||
/// Allows `#[doc(cfg_hide(...))]`. | |||
(active, doc_cfg_hide, "1.57.0", Some(43781), None), | |||
|
|||
/// Allows using the `non_exhaustive_omitted_patterns` lint. | |||
(active, non_exhaustive_omitted_patterns_lint, "1.57.0", Some(89549), None), |
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.
#89549 isn't a tracking issue (which this field represents) -- it's a rollup PR. I'd suggest just changing this to None
for now so we can get this merged.
(active, non_exhaustive_omitted_patterns_lint, "1.57.0", Some(89549), None), | |
(active, non_exhaustive_omitted_patterns_lint, "1.57.0", None, None), |
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.
Must be a copy/paste error, I did create a tracking issue here: #89554
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.
And FYI tidy prevents merging this without a tracking issue, hence why I created one
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.
And FYI tidy prevents merging this without a tracking issue, hence why I created one
Hmm, I wonder if that's new. I'm pretty sure I've seen feature gates merged without tracking issues before.
EDIT: It's not new; that check has been around since at least 2019. But there's this comment:
// We allow rustc-internal features to omit a tracking issue.
// To make tidy accept omitting a tracking issue, group the list of features
// without one inside `// no-tracking-issue` and `// no-tracking-issue-end`.
//~^^^^^ ERROR the `non_exhaustive_omitted_patterns` lint is unstable | ||
//~| ERROR the `non_exhaustive_omitted_patterns` lint is unstable | ||
//~| ERROR the `non_exhaustive_omitted_patterns` lint is unstable | ||
//~| ERROR the `non_exhaustive_omitted_patterns` lint is unstable |
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.
It's a bit odd that 4 errors are being reported, but I think outside of the testsuite, rustc deduplicates error, so this should be fine. Either way, I don't think it's your code that is causing this -- it's probably the lint machinery.
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.
Yeah, I thought that was odd and annoying also.
4c4fb4b
to
1ce6481
Compare
This comment has been minimized.
This comment has been minimized.
Actually add the feature to the lints ui test Add tracking issue to the feature declaration Rename feature gate to non_exhaustive_omitted_patterns_lint Add more omitted_patterns lint feature gate
1ce6481
to
1433878
Compare
@bors r=Nadrieril,camelid |
📌 Commit 1433878 has been approved by |
…Nadrieril,camelid Feature gate the non_exhaustive_omitted_patterns lint Fixes rust-lang#89374 Add the machinery to gate the new `non_exhaustive_omitted_patterns` lint. relates to rust-lang#89105 and rust-lang#89423
…Nadrieril,camelid Feature gate the non_exhaustive_omitted_patterns lint Fixes rust-lang#89374 Add the machinery to gate the new `non_exhaustive_omitted_patterns` lint. relates to rust-lang#89105 and rust-lang#89423
…askrgr Rollup of 11 pull requests Successful merges: - rust-lang#88374 (Fix documentation in Cell) - rust-lang#88713 (Improve docs for int_log) - rust-lang#89428 (Feature gate the non_exhaustive_omitted_patterns lint) - rust-lang#89438 (docs: `std::hash::Hash` should ensure prefix-free data) - rust-lang#89520 (Don't rebuild GUI test crates every time you run test src/test/rustdoc-gui) - rust-lang#89705 (Cfg hide no_global_oom_handling and no_fp_fmt_parse) - rust-lang#89713 (Fix ABNF of inline asm options) - rust-lang#89718 (Add #[must_use] to is_condition tests) - rust-lang#89719 (Add #[must_use] to char escape methods) - rust-lang#89720 (Add #[must_use] to math and bit manipulation methods) - rust-lang#89735 (Stabilize proc_macro::is_available) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #89374
Add the machinery to gate the new
non_exhaustive_omitted_patterns
lint.relates to #89105 and #89423