Skip to content

Issues regarding Self & self (in patterns) #6549

@pksunkara

Description

@pksunkara

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-completionautocompletionS-actionableSomeone could pick this issue up and work on it right now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions