Open
Description
This is a tracking issue for the non_exhaustive_omitted_patterns
lint.
The feature gate for the issue is #![feature(non_exhaustive_omitted_patterns_lint)]
.
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
- Implemented in Add non_exhaustive_omitted_patterns lint related to rfc-2008-non_exhaustive #86809
- Set a feature gate Feature gate the non_exhaustive_omitted_patterns lint #89428
- Adjust documentation (see instructions on rustc-dev-guide) — https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html#non-exhaustive-omitted-patterns
- Clippy false positive False positive in match_same_arms + non_exhaustive_omitted_patterns rust-clippy#10327
-
matches!
false positive False positive in non_exhaustive_omitted_patterns:matches!
#135137 - Stabilization PR (see instructions on rustc-dev-guide)
Unresolved Questions
- Lint name is potentially unclear New non_exhaustive_omitted_patterns lint exposes unstable and hidden enum variants. #89042 (comment)
- Lint message needs to be improved Feature gate the non_exhaustive_omitted_patterns lint #89428 (comment)
Implementation history
- Implemented in Add non_exhaustive_omitted_patterns lint related to rfc-2008-non_exhaustive #86809
- ICE was discovered in ICE related to non_exhaustive_omitted_patterns lint #89382 and fixed Fix ICE caused by non_exaustive_omitted_patterns struct lint #89423
- Feature gate PR Feature gate the non_exhaustive_omitted_patterns lint #89428
- A bug was discovered in New non_exhaustive_omitted_patterns lint exposes unstable and hidden enum variants. #89042 and fixed Fix: non_exhaustive_omitted_patterns by filtering unstable and doc hidden variants #89105
- Filter out unstable/hidden fields too
non_exhaustive_omitted_patterns
lint exposes unstable and hidden fields #89837 - Rework the lint to make it more consistent Lint
non_exhaustive_omitted_patterns
by columns #116734 - Warn users to not set the lint level on a single arm as was previously recommended Warn users who set
non_exhaustive_omitted_patterns
lint level on a match arm #117094
Metadata
Metadata
Assignees
Labels
Relating to exhaustiveness / usefulness checking of patternsArea: Lints (warnings about flaws in source code) such as unused_mut.Category: An issue tracking the progress of sth. like the implementation of an RFC`#![feature(non_exhaustive_omitted_patterns_lint)]`Status: This is ready to stabilize; it may need a stabilization report and a PRRelevant to the language team, which will review and decide on the PR/issue.