rust-lang / rust-lang/rust-analyzer

Do more name resolution in body lowering

Open
#14,498 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-hir C-Architecture C-enhancement
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

Right now body lowering is just that, going from AST -> HIR, all resolution actually happens in type checking. This makes the inference query a lot more complicated than it needs to be. Some things we should probably resolve are labels, lifetimes (unsure about this one) and paths (only partially given paths might require type info for full resolution).

cc https://github.com/rust-lang/rust-analyzer/pull/14368#discussion_r1139941211

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked discussion and tracing body lowering from AST to HIR, then compare it with the inference query and type checking. Determine which resolution responsibilities can move for labels, lifetimes, and partially resolvable paths; done means the inference query is simpler without requiring type information for full path resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.