Skip to content

Similar to native match pattern for braced structs, make matches_pattern enforce exhaustive field checks for braced structs by default, to be suppressed by explicit .. at the end of the pattern. #531

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
wants to merge 0 commits into from

Conversation

copybara-service[bot]
Copy link

Similar to native match pattern for braced structs, make matches_pattern enforce exhaustive field checks for braced structs by default, to be suppressed by explicit .. at the end of the pattern.

This change is not backward-compatible since:

  • It enforces field exhaustiveness by default in the absence of a trailing .. in the pattern.
  • Things that previously fell back to match pattern matching now use match_pattern!'s specialized matching, which requires the matched object to implement Debug.

Toward #447

@copybara-service copybara-service bot force-pushed the test_700843379 branch 2 times, most recently from f3796bb to e1389c6 Compare December 4, 2024 15:12
@copybara-service copybara-service bot closed this Dec 4, 2024
@copybara-service copybara-service bot deleted the test_700843379 branch December 4, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants