Skip to content

Re-expose nested bodies in rustc_borrowck::consumers #143666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nilehmann
Copy link

After #138499, it's not possible anymore to get borrowck information for nested bodies via get_body_with_borrowck_facts. This PR re-exposes nested bodies by returning a map containing the typeck root and all its nested bodies. To collect the bodies, a map is added to BorrowCheckRootCtxt, and a body is inserted every time do_mir_borrowck is called.

r? @lcnr

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 9, 2025
@lcnr
Copy link
Contributor

lcnr commented Jul 9, 2025

👍

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 9, 2025

📌 Commit 3c7bf9f has been approved by lcnr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 9, 2025
Kobzol added a commit to Kobzol/rust that referenced this pull request Jul 9, 2025
…rs, r=lcnr

Re-expose nested bodies in rustc_borrowck::consumers

After rust-lang#138499, it's not possible anymore to get borrowck information for nested bodies via `get_body_with_borrowck_facts`. This PR re-exposes nested bodies by returning a map containing the typeck root and all its nested bodies. To collect the bodies, a map is added to `BorrowCheckRootCtxt`, and a body is inserted every time `do_mir_borrowck` is called.

r? `@lcnr`
bors added a commit that referenced this pull request Jul 9, 2025
Rollup of 6 pull requests

Successful merges:

 - #143398 (tidy: add support for `--extra-checks=auto:` feature)
 - #143446 (use `--dynamic-list` for exporting executable symbols)
 - #143644 (Add triagebot stdarch mention ping)
 - #143660 (Disable docs for `compiler-builtins` and `sysroot`)
 - #143666 (Re-expose nested bodies in rustc_borrowck::consumers)
 - #143668 (Fix VxWorks build errors)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants