Make BorrowSet methods public again - #160017
Merged
Merged
Conversation
Collaborator
|
rustbot has assigned @ShoyuVanilla. Use Why was this reviewer chosen?The reviewer was selected based on:
|
mejrs
reviewed
Jul 27, 2026
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Collaborator
|
A job failed! Check out the build log: (web) (plain enhanced) (plain) Click to see the possible cause of the failure (guessed by this bot) |
mejrs
approved these changes
Jul 27, 2026
Contributor
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Jul 28, 2026
Make BorrowSet methods public again BorrowSet's methods were made private in rust-lang#159449 except for a couple used by Aquascope. I'd like to make these methods public again for Creusot, which indeed makes more extensive use of BorrowSet. Technically only `locals_state_at_exit` exposes information that is not already available in the current API (and Creusot does make use of it to call `Place::ignore_borrow`). The other fields can be reconstructed via `iter`, but it seems unnecessary to restrict the efficient access provided by the other methods to rustc's own analyses as opposed to third-party consumers.
This was referenced Jul 28, 2026
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 28, 2026
Rollup of 9 pull requests Successful merges: - #153563 (Lint against iterator functions that panic when `N` is zero ) - #159960 (Allow `UnsafeCell` content access without `get` in `invalid_reference_casting` lint) - #158893 (Clarify preconditions of raw size/align methods) - #159220 (Don't optimize across storage markers in SimplifyComparisonIntegral) - #159309 (Move tests batch 18) - #159450 (Add codegen test for enum clone) - #160017 (Make BorrowSet methods public again) - #160022 (Refactor rustc_hir re-exports) - #160041 (Correct tracking issue for `casefold` feature)
rust-timer
added a commit
that referenced
this pull request
Jul 28, 2026
Rollup merge of #160017 - Lysxia:pub-borrow-set, r=mejrs Make BorrowSet methods public again BorrowSet's methods were made private in #159449 except for a couple used by Aquascope. I'd like to make these methods public again for Creusot, which indeed makes more extensive use of BorrowSet. Technically only `locals_state_at_exit` exposes information that is not already available in the current API (and Creusot does make use of it to call `Place::ignore_borrow`). The other fields can be reconstructed via `iter`, but it seems unnecessary to restrict the efficient access provided by the other methods to rustc's own analyses as opposed to third-party consumers.
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.
BorrowSet's methods were made private in #159449 except for a couple used by Aquascope. I'd like to make these methods public again for Creusot, which indeed makes more extensive use of BorrowSet. Technically only
locals_state_at_exitexposes information that is not already available in the current API (and Creusot does make use of it to callPlace::ignore_borrow). The other fields can be reconstructed viaiter, but it seems unnecessary to restrict the efficient access provided by the other methods to rustc's own analyses as opposed to third-party consumers.