Skip to content

Use DisjunctionMatcher for any![] macro. #359

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

Merged
1 commit merged into from
Feb 6, 2024
Merged

Use DisjunctionMatcher for any![] macro. #359

1 commit merged into from
Feb 6, 2024

Conversation

bjacotg
Copy link
Collaborator

@bjacotg bjacotg commented Feb 3, 2024

This PR update:

  • the matcher used in any! to rely on DisjunctionMatcher and not on AnyMatcher (which is removed).
  • DisjunctionMatcher to generate Description more similar to AnyMatcher.
  • Remove the support of any![] (with empty matcher list). This should be implemented as not(anything()) which is a surprising behavior.
    • This could not be done for all! since it is used in the matches_pattern! often with empty matcher list.

This PR will allow the usage of any! where a matcher is constrain with HRTB is expected. See #323 for more details.

@bjacotg bjacotg force-pushed the any_with_disjunction branch 2 times, most recently from 2eca8c4 to d26ee50 Compare February 4, 2024 11:31
@bjacotg bjacotg force-pushed the any_with_disjunction branch from d26ee50 to 2ef3ca4 Compare February 4, 2024 11:36
@copybara-service copybara-service bot closed this pull request by merging all changes into main in 65af6d4 Feb 6, 2024
@gribozavr gribozavr deleted the any_with_disjunction branch February 17, 2025 18:30
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.

1 participant