6

Feature gate the non_exhaustive_omitted_patterns lint by DevinR528 · Pull Reques...

 2 years ago
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.

Copy link

Member

@camelid camelid left a comment

After fixing the tracking issue declaration and squashing, r=Nadrieril,camelid. Thanks for doing this follow-up feature-gating!

@@ -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.

Suggested change
(active, non_exhaustive_omitted_patterns_lint, "1.57.0", Some(89549), None), (active, non_exhaustive_omitted_patterns_lint, "1.57.0", None, None),

Copy link

Contributor

@Nadrieril Nadrieril 17 days ago

Must be a copy/paste error, I did create a tracking issue here: #89554

Copy link

Member

@camelid camelid 17 days ago

edited

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.

Copy link

Contributor

Author

@DevinR528 DevinR528 17 days ago

Yeah, I thought that was odd and annoying also.


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK