Skip to content
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

Generic methods using Self don't work #23

Closed
asomers opened this issue Aug 8, 2019 · 0 comments · Fixed by #25
Closed

Generic methods using Self don't work #23

asomers opened this issue Aug 8, 2019 · 0 comments · Fixed by #25
Labels
bug Something isn't working

Comments

@asomers
Copy link
Owner

asomers commented Aug 8, 2019

PR #21 was incomplete. It fixed non-generic methods using Self. However, it broke generic methods using Self. The problem is that mockall_derive/src/mock.rs:397 passes the merged generics field to expectation, but PR #21 treated it as the struct's generic only. The result is that automocking a generic constructor will give an unexpected type argument error.

@asomers asomers added the bug Something isn't working label Aug 8, 2019
asomers added a commit that referenced this issue Aug 10, 2019
Now it's possible to automock generic constructor methods

Fixes #23
asomers added a commit that referenced this issue Aug 10, 2019
Now it's possible to automock generic constructor methods

Fixes #23
asomers added a commit that referenced this issue Aug 10, 2019
Now it's possible to automock generic constructor methods

Fixes #23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant