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

Issues regarding Self & self (in patterns) #6549

Closed
pksunkara opened this issue Nov 14, 2020 · 1 comment · Fixed by #7616
Closed

Issues regarding Self & self (in patterns) #6549

pksunkara opened this issue Nov 14, 2020 · 1 comment · Fixed by #7616
Labels
A-completion autocompletion S-actionable Someone could pick this issue up and work on it right now

Comments

@pksunkara
Copy link
Contributor

pksunkara commented Nov 14, 2020

I have talked with @lnicola and decided that it's better to create an issue for this. Both of them are working fine for structs but they have a few issues for enums.

Variant not being auto completed

lib_rs_—_reign

Here, I wanted to do Self::Foo but as you can see Foo is missing from the list

Related #4650 (solves some of the issues in it if this is solved)

Fixed in #6960

Self not found in match

lib_rs_—_reign

Here, self resolves to &A and if I try to type Self, I don't get any completions at all. (Also weirdly I get Some which should not because self does not resolve to an option)

Ideally, I want to see both Self and Self::Foo in the completion list. (Because if we type A, we get both A and A::Foo)

Related #6404
Related #6550 (Fixing that should solve a part of this, but not fully)

@lnicola lnicola added A-ty type system / type inference / traits / method resolution S-actionable Someone could pick this issue up and work on it right now A-completion autocompletion and removed A-ty type system / type inference / traits / method resolution labels Nov 14, 2020
@lnicola lnicola changed the title Issues regarding Self & self Issues regarding Self & self (in patterns) Dec 9, 2020
bors bot added a commit that referenced this issue Dec 23, 2020
6960: Show enum variant on Self qualified paths r=matklad a=Veykril

Fixes first part of #6549
Fixes #6550

Co-authored-by: Lukas Wirth <[email protected]>
@ice1000
Copy link
Contributor

ice1000 commented Feb 8, 2021

I guess it also has something to do with #1908

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-completion autocompletion S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants