Skip to content

Fix invalid link in lowering.md and typo in thir.md - #3005

Open
000wahab000 wants to merge 1 commit into
rust-lang:mainfrom
000wahab000:fix-lowering-link-and-thir-typo
Open

Fix invalid link in lowering.md and typo in thir.md#3005
000wahab000 wants to merge 1 commit into
rust-lang:mainfrom
000wahab000:fix-lowering-link-and-thir-typo

Conversation

@000wahab000

@000wahab000 000wahab000 commented Sep 5, 2026

Copy link
Copy Markdown

Resolves #3004.

  • Fixes the expression index reference comment in src/thir.md (e0 -> e2).
  • Replaces the dead external hir::Crate link in src/hir/lowering.md with a relative link to the HIR chapter.

@rustbot

rustbot commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the PR. If you have write access, feel free to merge this PR if it does not need reviews. You can request a review using r? rustc-dev-guide or r? <username>.

@rustbot rustbot added the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Sep 5, 2026
@rustbot

This comment has been minimized.

@000wahab000
000wahab000 force-pushed the fix-lowering-link-and-thir-typo branch from 926f32b to 74c8881 Compare September 5, 2026 16:35
@reddevilmidzy reddevilmidzy self-assigned this Sep 7, 2026
Comment thread src/hir/lowering.md
The implementation of AST lowering is in the [`rustc_ast_lowering`] crate.
The entry point is [`lower_to_hir`], which retrieves the post-expansion AST
and resolver data from [`TyCtxt`] and builds the [`hir::Crate`] for the whole crate.
and resolver data from [`TyCtxt`] and builds the [HIR](../hir.md) for the whole crate.

@reddevilmidzy reddevilmidzy Sep 7, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this paragraph may need a bit more updating than just replacing the dead hir::Crate link. Since rust-lang/rust#157296, lower_to_hir is no longer a public entry point. Also, after rust-lang/rust#142830, it lowers an individual HIR owner rather than the whole crate.

it might be better to keep only the typo fix in thir.md in this PR and update hir/lowering.md more comprehensively in a separate PR.

View changes since the review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid link and a possible typo in the "Source code representation" section of the guide

3 participants