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

Allow mocking non-'static structs #114

Merged
merged 1 commit into from
Mar 29, 2020
Merged

Allow mocking non-'static structs #114

merged 1 commit into from
Mar 29, 2020

Conversation

asomers
Copy link
Owner

@asomers asomers commented Mar 29, 2020

Constructor methods are not yet supported.

Fixes #4

The gory details:

  • Generics of mock structs should not include lifetimes
  • deselfify before split lifetimes
  • Include rlifetimes in some impl blocks
  • Include some missing <> in an intermediate Generics object
  • Fix deselfify with lifetimes
  • Handle apparently unused lifetimes in split_lifetimes
  • Fix determination of whether a method is generic in method_types. There was
    some leftover logic from back when all methods of generic structs were
    treated as generic methods.
  • Remove lifetimes from Context objects

Constructor methods are not yet supported.

Fixes #4

The gory details:
* Generics of mock structs should not include lifetimes
* deselfify before split lifetimes
* Include rlifetimes in some impl blocks
* Include some missing <> in an intermediate Generics object
* Fix deselfify with lifetimes
* Handle apparently unused lifetimes in  split_lifetimes
* Fix determination of whether a method is generic in method_types.  There was
  some leftover logic from back when all methods of generic structs were
  treated as generic methods.
* Remove lifetimes from Context objects
@asomers asomers merged commit e004479 into master Mar 29, 2020
@asomers asomers deleted the nonstatic_structs branch March 29, 2020 19:02
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.

Allow mocking non-'static structs
1 participant