-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Better diagnostic when pattern matching tuple structs #109760
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
Better diagnostic when pattern matching tuple structs #109760
Conversation
r? @jackh726 (rustbot has picked a reviewer for you, use r? to override) |
@rustbot label +A-diagnostics |
Better diagnostic message when trying to pattern match a tuple struct with a struct pattern.
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (696aaad): 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 Warning ⚠: The following benchmark(s) failed to build:
cc @rust-lang/wg-compiler-performance 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.
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.
|
Looks like the regression was a blip as the next run reverses the regressions. @rustbot label +perf-regression-triaged |
Fixes #108284
When trying to pattern match a tuple struct we might get a flawed error message if there are missing fields. E.g.
Produces this error:
Which doesn't highlight that we can still use the struct syntax but we need to fill missing fields. This pr changes this error to: