

Feature gate the non_exhaustive_omitted_patterns lint by DevinR528 · Pull Reques...
source link: https://github.com/rust-lang/rust/pull/89428
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

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),
#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.
Must be a copy/paste error, I did create a tracking issue here: #89554
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
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.
Yeah, I thought that was odd and annoying also.
Recommend
-
13
Never patterns, exhaustive matching, and uninhabited types (oh my!) Aug 13, 2018 One of the long-standing issues that we’ve been wrestling with in Rust is how to integrate the concept of an “uninhabited type” – that is,...
-
12
Contributor Nadrieril commented
-
11
Copy link Contributor derekdreery ...
-
11
New issue Remove requirement of fully qualified path for disallowed_method/type #7345
-
5
Copy link Contributor DevinR528 comment...
-
11
New issue Fix emitting in nested (proc_)macros for nonstandard_macro_braces lint #7431
-
5
Copy link Collaborator llogiq...
-
4
New issue Fix ICE caused by non_exaustive_omitted_patterns struct lint #89423
-
8
Conversation Contributor...
-
3
Conversation Member...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK