-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Replace all Self
identifiers in method argument and return types
#4155
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Gladly. I assume that this is a general remark about my PRs and I will add some more code comments from now on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
(needs a rebase again)
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 allSelf
identifiers with the identifier for the type. This makes the code very simple and guarantees that no occurrences ofSelf
are left.