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
Support inferring&completing Self
type in enum/struct/union definitions
#1924
Conversation
I've updated the comment in #1908 with a screenshot. |
Note that this should also work for structs; also, struct List<T> {
elem: T,
next: Option<Box<Self>>,
} (For a test, I'd shorten that to We already resolve I think I'd suggest adding an (Handling the scope here will also mean we'll complete |
Changed implementation into |
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
✌️ ice1000 can now approve this pull request. To approve and merge a pull request, simply reply with |
I'm gonna apply the review suggestions locally instead of using GitHub. |
I'm very nervous. It's my first time to summon bors for merging a PR. |
Self
type in enum definitionsSelf
type in enum/struct/union definitions
@ice1000 we have a rather extensive test suite, so the probability that something breaks spectacularly is pretty low :) Just reply with bors r+ comment |
Between the darkness and the dawn, a PR bot rises! bors r+ |
1924: Support inferring&completing `Self` type in enum/struct/union definitions r=ice1000 a=ice1000 Signed-off-by: ice1000 <ice1000kotlin@foxmail.com> An attempt to fix #1908. This code works, but I believe the implementation is ugly. Please give me suggestions! Co-authored-by: ice1000 <ice1000kotlin@foxmail.com>
Build succeeded |
Signed-off-by: ice1000 ice1000kotlin@foxmail.com
An attempt to fix #1908.
This code works, but I believe the implementation is ugly. Please give me suggestions!