Skip to content

Consistently implement MethodImplementation wrt. lifetimes#193

Merged
madsmtm merged 1 commit into
masterfrom
declare-lifetimes
Jul 7, 2022
Merged

Consistently implement MethodImplementation wrt. lifetimes#193
madsmtm merged 1 commit into
masterfrom
declare-lifetimes

Conversation

@madsmtm
Copy link
Copy Markdown
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