-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Exhaustiveness: simplify empty pattern logic #119835
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
7c28f22
to
4ed9a73
Compare
I'll review this in a few days |
This comment was marked as outdated.
This comment was marked as outdated.
We had reached a point where the shenanigans about omitting empty arms are unnecessary.
4ed9a73
to
d95644d
Compare
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Exhaustiveness: simplify empty pattern logic The logic that handles empty patterns had gotten quite convoluted. This PR simplifies it a lot. I tried to make the logic as easy as possible to follow; this only does logically equivalent changes. The first commit is a drive-by comment clarification that was requested after another PR a while back. r? `@compiler-errors`
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (ce365bf): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 664.25s -> 663.387s (-0.13%) |
i will review this tomorrow along w/ the other one, ping me on thursday if i have not |
@bors r+ |
@bors rollup=maybe |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#117561 (Stabilize `slice_first_last_chunk`) - rust-lang#117662 ([rustdoc] Allows links in headings) - rust-lang#119815 (Format sources into the error message when loading codegen backends) - rust-lang#119835 (Exhaustiveness: simplify empty pattern logic) - rust-lang#119984 (Change return type of unstable `Waker::noop()` from `Waker` to `&Waker`.) - rust-lang#120009 (never_patterns: typecheck never patterns) - rust-lang#120122 (Don't add needs-triage to A-diagnostics) - rust-lang#120126 (Suggest `.swap()` when encountering conflicting borrows from `mem::swap` on a slice) - rust-lang#120134 (Restrict access to the private field of newtype indexes) Failed merges: - rust-lang#119968 (Remove unused/unnecessary features) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#117561 (Stabilize `slice_first_last_chunk`) - rust-lang#117662 ([rustdoc] Allows links in headings) - rust-lang#119815 (Format sources into the error message when loading codegen backends) - rust-lang#119835 (Exhaustiveness: simplify empty pattern logic) - rust-lang#119984 (Change return type of unstable `Waker::noop()` from `Waker` to `&Waker`.) - rust-lang#120009 (never_patterns: typecheck never patterns) - rust-lang#120122 (Don't add needs-triage to A-diagnostics) - rust-lang#120126 (Suggest `.swap()` when encountering conflicting borrows from `mem::swap` on a slice) - rust-lang#120134 (Restrict access to the private field of newtype indexes) Failed merges: - rust-lang#119968 (Remove unused/unnecessary features) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#119835 - Nadrieril:simplify-empty-logic, r=compiler-errors Exhaustiveness: simplify empty pattern logic The logic that handles empty patterns had gotten quite convoluted. This PR simplifies it a lot. I tried to make the logic as easy as possible to follow; this only does logically equivalent changes. The first commit is a drive-by comment clarification that was requested after another PR a while back. r? `@compiler-errors`
The logic that handles empty patterns had gotten quite convoluted. This PR simplifies it a lot. I tried to make the logic as easy as possible to follow; this only does logically equivalent changes.
The first commit is a drive-by comment clarification that was requested after another PR a while back.
r? @compiler-errors