-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Improve diagnostics and code for exhaustiveness of empty matches #67026
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
86fb2ef
Clarify handling of `exhaustive_patterns` in `all_constructors`
Nadrieril 063d74f
Fix explanation of handling of empty enums
Nadrieril 922310d
Add tests
Nadrieril b26aa0b
Factor out some `non_exhaustive`-related checks
Nadrieril 1bd97ae
Tweak error on empty match
Nadrieril 1c77a04
Fix erroneous comment
Nadrieril 5628d4a
Make empty match lint more consistent under exhaustive_patterns
Nadrieril 2099dd1
Add tests
Nadrieril c0f3c06
Only warn about missing patterns in the case of an enum
Nadrieril 5a3b7d2
Add tests
Nadrieril e444346
List missing constructors in an almost empty match
Nadrieril 2216318
Use the default code path to list missing patterns
Nadrieril 3532835
Simplify
Nadrieril d289f55
Move empty match check to `check_exhaustive`
Nadrieril 40f434b
Reuse `adt_defined_here`
Nadrieril 3e6dc2b
Forgot to update some test outputs
Nadrieril bfb556f
Move empty_match check after usefulness check
Nadrieril a591ede
Only special-case empty matches when `exhaustive_patterns` is off
Nadrieril fe5d84d
Simplify
Nadrieril d44774d
Forgot to update some test outputs
Nadrieril fbd2cd0
Revert a diagnostic change in the case of integer ranges
Nadrieril File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.