Skip to content

Make Matcher::ActualT a generic parameter instead of an associated type #349

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
merged 1 commit into from
Apr 12, 2024

Conversation

bjacotg
Copy link
Collaborator

@bjacotg bjacotg commented Jan 12, 2024

This change will fix #323.

Matchers will be more generic so they will be able to handle different ActualT types, which is most necessary for types with parametric lifetime. However, this will bring back the issues with Matcher::and and Matcher::or being non-deterministic. This is solved by moving these functions to a non-generic extension trait.

@bjacotg bjacotg force-pushed the generic_parameter branch 3 times, most recently from 3854a1d to 81abbac Compare February 16, 2024 13:31
@bjacotg bjacotg marked this pull request as ready for review February 16, 2024 13:37
copybara-service bot pushed a commit to protocolbuffers/protobuf that referenced this pull request Feb 16, 2024
--
4b67c374d49b00860a8f285aae2e064cc58a0dc7 by Bastien Jacot-Guillarmod <[email protected]>:

Make `ActualT` in `Matcher` a generic type parameter.

COPYBARA_INTEGRATE_REVIEW=google/googletest-rust#349 from google:generic_parameter 4b67c374d49b00860a8f285aae2e064cc58a0dc7
FUTURE_COPYBARA_INTEGRATE_REVIEW=google/googletest-rust#349 from google:generic_parameter 4b67c374d49b00860a8f285aae2e064cc58a0dc7
PiperOrigin-RevId: 607661947
copybara-service bot pushed a commit to protocolbuffers/protobuf that referenced this pull request Feb 16, 2024
--
4b67c374d49b00860a8f285aae2e064cc58a0dc7 by Bastien Jacot-Guillarmod <[email protected]>:

Make `ActualT` in `Matcher` a generic type parameter.

COPYBARA_INTEGRATE_REVIEW=google/googletest-rust#349 from google:generic_parameter 4b67c374d49b00860a8f285aae2e064cc58a0dc7
FUTURE_COPYBARA_INTEGRATE_REVIEW=google/googletest-rust#349 from google:generic_parameter 4b67c374d49b00860a8f285aae2e064cc58a0dc7
PiperOrigin-RevId: 607661947
@bjacotg bjacotg changed the title Migrate back to generic type parameter Make Matcher::ActualT a generic parameter instead of an associated type Feb 16, 2024
@copybara-service copybara-service bot merged commit 4b67c37 into main Apr 12, 2024
1 check passed
@gribozavr gribozavr deleted the generic_parameter 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.

Limitations of the Matcher Trait with Proxy reference type
1 participant