Repository navigation
Fix the stale crate name in the region inference chapter - #3076
Closed
isHeSatoshi wants to merge 1 commit into
Closed
isHeSatoshi wants to merge 1 commit into
isHeSatoshi wants to merge 1 commit into
Conversation
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`.
This comment was marked as low quality.
This comment was marked as low quality.
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 |
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the stale crate name in
src/borrow-check/region-inference.md.The first paragraph said:
There is no
borrow_checkmodule inrustc_borrowck. The crate's modules areborrow_set,nll,region_infer,type_check, and so on; the borrow checking itself moved out ofrustc_mirinto 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:
rustc_borrowck, notrustc_mirrustc_borrowck::region_inferborrow-check.mdin the same directory says "the borrow checker source is found in [therustc_borrowckcrate]"Checked against the current compiler rather than assumed:
rustc_borrowckis a crate incompiler/(there is norustc_mircrate any more, onlyrustc_mir_build,rustc_mir_dataflowandrustc_mir_transform), and the crate's rustdoc page lists noborrow_checkmodule.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/sembriscontinue-on-errorin 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.