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

Consistently implement MethodImplementation wrt. lifetimes #193

Merged
merged 1 commit into from
Jul 7, 2022

Conversation

madsmtm
Copy link
Owner

@madsmtm madsmtm commented Jul 7, 2022

Part of #30. This is required for #190.

Fixes upstream SSheldon/rust-objc#12, see that for more details.

Previously, the receiver's lifetime was higher-ranked, while the rest of the arguments weren't, which meant that:

  • Their type could not be inferred like the other arguments
  • Having a return type with a lifetime bound to the receiver was impossible

This is a breaking change (can't avoid that, lest we run into a future-compat error), and is unfortunately difficult for users to know how to fix, not really sure how to improve that situation?

Previously, the receiver's lifetime was higher-ranked, while the rest of the arguments weren't, which meant that:
- Their type could not be inferred like the other arguments
- Having a return type with a lifetime bound to the receiver was impossible

Fixes upstream SSheldon/rust-objc#12, at least as far as possible right now.

This is a breaking change, and is unfortunately difficult for users to know how to fix, not really sure how to improve that situation?
@madsmtm madsmtm added bug Something isn't working A-objc2 Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` crates labels Jul 7, 2022
This was referenced Jul 7, 2022
@madsmtm madsmtm merged commit 1dcf0d7 into master Jul 7, 2022
@madsmtm madsmtm deleted the declare-lifetimes branch July 7, 2022 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-objc2 Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` crates bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant