-
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
pattern_analysis: Gracefully abort on type incompatibility #120313
Conversation
This will regress match-stress @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
pattern_analysis: Gracefully abort on type incompatibility This leaves the option for a consumer of the crate to return `Err` instead of panicking on type error. rust-analyzer could use that (e.g. rust-lang/rust-analyzer#15808). Since the only use of `TypeCx::bug` is in `Constructor::is_covered_by`, it is tempting to return `false` instead of `Err()`, but that would cause "non-exhaustive match" false positives. r? `@compiler-errors`
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (8d0058e): comparison URL. Overall result: ❌ regressions - 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 is a highly reliable metric that was used to determine the overall result at the top of this comment.
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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 663.194s -> 663.003s (-0.03%) |
Lol, for once I did not regress match-stress |
Grmbl, bors didn't tell me about the merge conflict again :( |
b15141a
to
7d53726
Compare
I rebased onto #120321 because conflicts, only the last commit is this PR |
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.
r=me
Since the only use of `TypeCx::bug` is in `Constructor::is_covered_by`, it is tempting to return `false` instead of `Err()`, but that would cause "non-exhaustive match" false positives.
7d53726
to
400dc46
Compare
@bors r+ |
🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened. |
Ah nice, CI is back on @bors rollup |
What am I doing, this one had a perf regression @bors rollup=never |
☀️ Test successful - checks-actions |
Finished benchmarking commit (f067fd6): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 660.166s -> 661.246s (0.16%) |
The pattern matching machinery is now being changed a lot, and the @rustbot label: +perf-regression-triaged |
This leaves the option for a consumer of the crate to return
Err
instead of panicking on type error. rust-analyzer could use that (e.g. rust-lang/rust-analyzer#15808).Since the only use of
TypeCx::bug
is inConstructor::is_covered_by
, it is tempting to returnfalse
instead ofErr()
, but that would cause "non-exhaustive match" false positives.r? @compiler-errors