Skip to content

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

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

Closed
Veykril opened this issue Aug 14, 2022 · 0 comments · Fixed by #16279
Closed

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

Veykril opened this issue Aug 14, 2022 · 0 comments · Fixed by #16279
Labels
A-hir hir and hir-def related C-bug Category: bug

Comments

@Veykril
Copy link
Member

Veykril commented Aug 14, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-hir hir and hir-def related C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant