rust-lang / rust-lang/rustc-dev-guide

HIR documentation is outdated

Open
#1,896 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-HIR E-medium I-outdated T-compiler
Dominant language
HTML
Stars
1.9k
Forks
613
Avg merge
17h 24m
Merged PRs (30d)
39

Description

Regarding https://rustc-dev-guide.rust-lang.org/hir.html
It references the find method, which was renamed in 24f009c5e55d18c12563dd74681ca33b8a349936 into opt_hir_node which itself was deleted in a61019b29021b7635113b48e470dbac724c81c76

As far as I understand the commits I see, the assertion

Most of the time when you are working with the HIR, you will do so via the HIR Map, accessible in the tcx via tcx.hir()

became false. Those methods to navigate the HIR are now directly in Tcx. I don't know whether it's always the case or only on those examples.

I'll plainly admit I don't know enough about rustc or the HIR to know what is relevant in the documentation, so I won't create a PR myself.

Contributor guide

No contributing guide indexed for this repository

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 with the HIR documentation at rustc-dev-guide.rust-lang.org/hir.html and compare its HIR Map, tcx.hir(), find, and opt_hir_node references with the commits named in the issue. Confirm the current TyCtxt navigation methods and update the outdated explanation so it matches present rustc behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.