Skip to content

Add BorrowSet to public api #90281

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

Merged
merged 1 commit into from
Oct 28, 2021
Merged

Conversation

xldenis
Copy link
Contributor

@xldenis xldenis commented Oct 25, 2021

This PR adds BorrowSet to the public api so that verification tools can obtain the activation and reservation points of two phase borrows without having to redo calculations themselves (and thus potentially differently from rustc).

Turns out we already can obtain MoveData thanks to the public HasMoveData trait, so constructing a BorrowSet should not provide much of an issue. However, I can't speak to the soundness of this approach, is it safe to take an under-approximation of MoveData?

r? @nikomatsakis

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 25, 2021
@apiraino apiraino added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 28, 2021
@nikomatsakis
Copy link
Contributor

@bors r+

To be clear on how I see it: this is a temporary measure (along with some others we have taken) to create access to borrow checker results, but it comes with no stability guarantee, and we should revisit these APIs and try to create something we expect to be able to maintain.

@bors
Copy link
Collaborator

bors commented Oct 28, 2021

📌 Commit 9894a9a has been approved by nikomatsakis

@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 Oct 28, 2021
@bors
Copy link
Collaborator

bors commented Oct 28, 2021

⌛ Testing commit 9894a9a with merge c390d69...

@bors
Copy link
Collaborator

bors commented Oct 28, 2021

☀️ Test successful - checks-actions
Approved by: nikomatsakis
Pushing c390d69 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 28, 2021
@bors bors merged commit c390d69 into rust-lang:master Oct 28, 2021
@rustbot rustbot added this to the 1.58.0 milestone Oct 28, 2021
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c390d69): comparison url.

Summary: This benchmark run did not return any relevant changes.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

7 participants