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
Support for anonymous lifetimes #87
Comments
|
Hm, while I see your point, I don't think the benefit to this feature is very great, since the workaround is trivial. Is there any method that can't be mocked just by naming the liftetimes? If not, then I'm not going to give this feature much priority. |
Hopefully not :) I agree it's not a priority. |
|
|
|
How so, @MOZGIII ? |
|
#75 (comment) |
|
If that's your only concern then I wouldn't say need since you can always specify a named lifetime, just like in https://github.com/asomers/mockall/blob/master/mockall/tests/mock_generic_method_returning_nonstatic.rs . |
|
That would require changing the trait. You can’t always do that, so it’s not a fair solution. |
|
patches welcome. |
|
Ok, I have this working. However, I still don't really understand the need. Can you give an example of a real-world trait with such a method? |
This example doesn't work:
If I specify the lifetime explicitly it does.
The text was updated successfully, but these errors were encountered: