-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[Experiment] Split exhaustiveness logic into its own crate #89570
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
Closed
Nadrieril
wants to merge
26
commits into
rust-lang:master
from
Nadrieril:split-exhaustiveness-into-crate
Closed
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
dc6c89a
Filter unstable and doc hidden variants in exhaustive check
DevinR528 068325b
Add test cases for unstable variants
DevinR528 6f86964
Diagnostic output for unstable variant tests
DevinR528 3dd5ad2
Add test cases for doc hidden variants
DevinR528 0d58694
Diagnostic output for doc hidden variants
DevinR528 311333b
Remove io::ErrorKind and update reachable-patterns diagnostic output
DevinR528 9927c1f
Fix behavior of doc hidden filtering
DevinR528 b02590d
Cleanup check for unstable attributes on variants
DevinR528 5d5b381
Move unstable patterns test to patterns/usefulness
DevinR528 34d9075
Add a test
Nadrieril 0f1dcc6
Fix a comment
Nadrieril 033aeb8
`PatternFolder` is no longer used
Nadrieril e8c10f5
Add a constructor for box patterns
Nadrieril 25f0710
Add a constructor for ref patterns
Nadrieril 13c418f
Add a constructor for tuple patterns
Nadrieril 2cb2a54
Reorder the logic of `SplitWildcard::new`
Nadrieril 3ca5461
Add explicit constructors for bool values
Nadrieril 4c286e2
Evaluate consts earlier
Nadrieril 604b31b
Don't lint from within the algorithm; collect instead
Nadrieril 1684c64
Always report unreachable subpatterns
Nadrieril 784d29a
Move conversion to/from `thir::Pat` out of deconstruct_pat
Nadrieril 03eb4be
Move abi-related computations out of deconstruct_pat
Nadrieril 474e763
Reuse `size` since we have it
Nadrieril c4f840d
Move `tcx`-dependent code out of deconstruct_pat
Nadrieril f1e56c6
Remove all matching on `Ty` from deconstruct_pat
Nadrieril ec2324b
Thread everything rustc-dependent via a trait
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a bugfix?
This seems like it might be a source of performance impact.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is because I split the
Single
case into more specific subcases so that I could abstract it all in a trait. I suspected this could be the source of perf degradation but my local measurements don't show much impact from this.The problem of course is that my local measurements don't match what
rust-timer
reports here so you could be right. When I get back to this I'll measure intermediate commits withrust-timer
.