Replace all Self identifiers in method argument and return types#4155
Merged
daxpedda merged 9 commits intowasm-bindgen:mainfrom Oct 10, 2024
Merged
Replace all Self identifiers in method argument and return types#4155daxpedda merged 9 commits intowasm-bindgen:mainfrom
Self identifiers in method argument and return types#4155daxpedda merged 9 commits intowasm-bindgen:mainfrom
Conversation
Co-authored-by: Oliver T <geronimooliver00@gmail.com>
daxpedda
reviewed
Oct 9, 2024
Member
daxpedda
left a comment
There was a problem hiding this comment.
I would appreciate if you could leave some code comments here, I always have to spend non-trivial time digging into this when it comes up.
Contributor
Author
Gladly. I assume that this is a general remark about my PRs and I will add some more code comments from now on. |
daxpedda
reviewed
Oct 9, 2024
daxpedda
approved these changes
Oct 10, 2024
Member
daxpedda
left a comment
There was a problem hiding this comment.
Thank you!
(needs a rebase again)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #3105
closes #3631
This PR is based on #3631 by @snOm3ad. I looked at it to see what needed to be changed and that I stole tests from there. I tagged @snOm3ad as the co-author in one commit, but (speaking to the maintainer) please also tag them in the merge commit of this PR in case GH doesn't.
The main approach of this PR is different from #3631. I used
syn's mut visitor to replace allSelfidentifiers with the identifier for the type. This makes the code very simple and guarantees that no occurrences ofSelfare left.