Skip to content

tuple field accesses don't support IDE features properly #13018

Closed
@Veykril

Description

@Veykril
struct S;
(S,).0;

Hovering the 0 index here triggers a type based hover which kind of works, but is not quite right.
More importantly though we fail to support downmapped tuple index accesses like in

assert!((S,).0 == (S,).0);

the 0 are getting highlighted as unresolved references.

This because we do not record these field accesses in the inference result due to them not having a declaration site as tuples are a builtin type with no declaration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-hirhir and hir-def relatedC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions