rust-lang / rust-lang/rust

Investigate feeding `def_span` in the resolver

Open
#118,552 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-query-system C-cleanup E-help-wanted E-medium T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

This is the same idea as https://github.com/rust-lang/rust/pull/118188 but for the def_span queries.

At each place where https://github.com/rust-lang/rust/pull/118188 added a call to tcx.feed_local_def_id(..).def_kind, we need to add a call to def_span. The parameter to this call should mimick the implementation of def_span in rustc_middle::hir::map.

Please contact me on zulip for questions.

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 reviewing rust-lang/rust#118188 and locate each place where it added tcx.feed_local_def_id(..).def_kind. Then inspect def_span in rustc_middle::hir::map to determine the corresponding parameter for each def_span call. Done means all matching call sites feed def_span consistently with that implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.