-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.D-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.F-non_exhaustive_omitted_patterns_lint`#![feature(non_exhaustive_omitted_patterns_lint)]``#![feature(non_exhaustive_omitted_patterns_lint)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Milestone
Description
See #86809 (comment)
The non_exhaustive_omitted_patterns
lint exposes #[unstable]
and #[doc(hidden)]
variants.
E.g. for io::Error
:
error: some variants are not matched explicitly
--> src/main.rs:47:9
|
47 | _ => {}
| ^ pattern `Uncategorized` not covered
|
note: the lint level is defined here
--> src/main.rs:4:12
|
4 | #[deny(non_exhaustive_omitted_patterns)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: ensure that all variants are matched explicitly by adding the suggested match arms
= note: the matched value is of type `ErrorKind` and the `non_exhaustive_omitted_patterns` attribute was found
But Uncategorized
is both hidden and unstable, and should not be considered part of the public api.
It'd be good to fix this before it hits stable in 1.57.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.D-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.F-non_exhaustive_omitted_patterns_lint`#![feature(non_exhaustive_omitted_patterns_lint)]``#![feature(non_exhaustive_omitted_patterns_lint)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.