Skip to content
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

addr_of! grants mutable access, maybe? #90413

Merged
merged 2 commits into from
Nov 3, 2021
Merged

Conversation

tmiasko
Copy link
Contributor

@tmiasko tmiasko commented Oct 30, 2021

The exact set of permissions granted when forming a raw reference is
currently undecided #56604.

To avoid presupposing any particular outcome, adjust the const
qualification to be compatible with decision where raw reference
constructed from addr_of! grants mutable access.

Additionally, to avoid keeping MaybeMutBorrowedLocals in sync with
const qualification, remove it. It's no longer used.

@rust-lang/wg-const-eval

@rust-highfive
Copy link
Collaborator

r? @nagisa

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 30, 2021
@tmiasko
Copy link
Contributor Author

tmiasko commented Oct 30, 2021

@oli-obk @ecstatic-morse to address concerns from #90214 about duplication with MaybeMutBorrowedLocals, I decided to remove it, since we no longer used it anywhere else, but let me know if you prefer to retain it.

@oli-obk
Copy link
Contributor

oli-obk commented Oct 30, 2021

Ah, if that was the only user, then this is perfect!

@oli-obk
Copy link
Contributor

oli-obk commented Oct 30, 2021

Impl lgtm

r? @RalfJung

@oli-obk
Copy link
Contributor

oli-obk commented Oct 30, 2021

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 30, 2021
@bors
Copy link
Contributor

bors commented Oct 30, 2021

⌛ Trying commit cab381fbddc6e023cab60bcec6dc82b2119faa27 with merge e6aabc9436a8e1ac1d5b98eb99e44b56694506c5...

@bors
Copy link
Contributor

bors commented Oct 30, 2021

☀️ Try build successful - checks-actions
Build commit: e6aabc9436a8e1ac1d5b98eb99e44b56694506c5 (e6aabc9436a8e1ac1d5b98eb99e44b56694506c5)

@rust-timer
Copy link
Collaborator

Queued e6aabc9436a8e1ac1d5b98eb99e44b56694506c5 with parent 22f1ad7, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e6aabc9436a8e1ac1d5b98eb99e44b56694506c5): 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.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR led to changes in compiler perf.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 30, 2021
The exact set of permissions granted when forming a raw reference is
currently undecided rust-lang#56604.

To avoid presupposing any particular outcome, adjust the const
qualification to be compatible with decision where raw reference
constructed from `addr_of!` grants mutable access.
@RalfJung
Copy link
Member

RalfJung commented Nov 3, 2021

The analysis makes sense to me. The MaybeMutBorrowedLocals removal is code I have never seen but Oli reviewed it, so let's go ahead.

@bors r=RalfJung,oli-obk

@bors
Copy link
Contributor

bors commented Nov 3, 2021

📌 Commit bc4931e has been approved by RalfJung,oli-obk

@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 Nov 3, 2021
@bors
Copy link
Contributor

bors commented Nov 3, 2021

⌛ Testing commit bc4931e with merge baba668...

@bors
Copy link
Contributor

bors commented Nov 3, 2021

☀️ Test successful - checks-actions
Approved by: RalfJung,oli-obk
Pushing baba668 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 3, 2021
@bors bors merged commit baba668 into rust-lang:master Nov 3, 2021
@rustbot rustbot added this to the 1.58.0 milestone Nov 3, 2021
@tmiasko tmiasko deleted the addr-of-mutable branch November 3, 2021 21:19
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (baba668): 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

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 20, 2021
Implement `clone_from` for `State`

Data flow engine uses `clone_from` for domain values.  Providing an
implementation of `clone_from` will avoid some intermediate memory
allocations.

Extracted from rust-lang#90413.

r? `@oli-obk`
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants