Skip to content

Fix the stale crate name in the region inference chapter - #3076

Closed
isHeSatoshi wants to merge 1 commit into
rust-lang:mainfrom
isHeSatoshi:fix-stale-borrowck-crate-name
Closed

isHeSatoshi wants to merge 1 commit into
rust-lang:mainfrom
isHeSatoshi:fix-stale-borrowck-crate-name

Conversation

@isHeSatoshi

Copy link
Copy Markdown

Fixes the stale crate name in src/borrow-check/region-inference.md.

The first paragraph said:

The MIR-based region checking code is located in [the rustc_mir::borrow_check module][nll].

There is no borrow_check module in rustc_borrowck. The crate's modules are borrow_set, nll, region_infer, type_check, and so on; the borrow checking itself moved out of rustc_mir into its own crate. So the sentence named both a crate that no longer holds this code and a module that does not exist.

The file already contradicted itself about this, which is what made it worth fixing:

  • its own link on the next line points at rustc_borrowck, not rustc_mir
  • a later sentence refers to rustc_borrowck::region_infer
  • borrow-check.md in the same directory says "the borrow checker source is found in [the rustc_borrowck crate]"

Checked against the current compiler rather than assumed: rustc_borrowck is a crate in compiler/ (there is no rustc_mir crate any more, only rustc_mir_build, rustc_mir_dataflow and rustc_mir_transform), and the crate's rustdoc page lists no borrow_check module.

I also put the sentence on one line, which is the semantic line break style the contributor guide asks for; the rest of this file is hard-wrapped, so I left that alone rather than reflowing the whole chapter. ci/sembr is continue-on-error in CI, and this file was already listed as non-compliant before this change, so this does not affect the check either way.

The existing link is unchanged and still resolves.

The chapter said the MIR-based region checking code is in "the
`rustc_mir::borrow_check` module", but there is no such module: the code
lives in the `rustc_borrowck` crate, and that crate has no `borrow_check`
module in it.

The file already disagreed with itself about this, since its own link
points at `rustc_borrowck` and a later sentence refers to
`rustc_borrowck::region_infer`.
@isHeSatoshi

This comment was marked as low quality.

@rustbot

rustbot commented Oct 19, 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 Oct 19, 2026
@BoxyUwU BoxyUwU closed this Oct 19, 2026
@rustbot rustbot removed the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Oct 19, 2026
@jieyouxu

Copy link
Copy Markdown
Member

Hi there,

This looks like an automated submission, which is not permitted.

We are thus suspending you as per our policies [1], [2] and contribution standards [3]. You can contact the moderation team to discuss and possibly reconsider your suspension.

Thanks for understanding.

Jieyou in the name of the mod team

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants