You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support enum variants and structs with no fields in matches_pattern!.
Previously, attempting to match a pattern on an enum variant with no fields would not be matched by `matches_pattern!`, resulting in a recursion error during compilation:
```
enum MyEnum {
A
}
verify_that!(value, matches_pattern!(MyEnum::A))
^^^^^^^^^ Error! Maximum recursion depth exceeded.
```
The support had simply been omitted from `matches_pattern!`. This adds support for such cases to the macro, using the `predicate` matcher to handle them.
PiperOrigin-RevId: 539567060
0 commit comments