Closed
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
Area: Messages for errors, warnings, and lintsCategory: This is a bug.Diagnostics: Confusing error or lint that should be reworked.`#![feature(non_exhaustive_omitted_patterns_lint)]`Relevant to the compiler 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.