Skip to content

Conversation

LorrensP-2158466
Copy link
Contributor

@LorrensP-2158466 LorrensP-2158466 commented Sep 6, 2025

Introduces wrappers around Cell and RefCell that only allow mutation when we are not in speculative resolution. This is preparatory work for #145108.

It would allow us to make ImportData and ModuleData sync and send safe.

r? @petrochenkov

@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 Sep 6, 2025
@LorrensP-2158466
Copy link
Contributor Author

This is the most botched code I have ever written, but it should work in #145108.

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 25, 2025
@LorrensP-2158466
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 25, 2025
@petrochenkov
Copy link
Contributor

r=me after addressing the remaining comments and squashing commits.
@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 25, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 25, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@LorrensP-2158466
Copy link
Contributor Author

r=me after addressing the remaining comments and squashing commits.

Unfortunately, I don't have those powers, you have delegated those to me :).

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 25, 2025
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 25, 2025

📌 Commit 0374df1 has been approved by petrochenkov

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 Sep 25, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Sep 26, 2025
…r=petrochenkov

Resolve: (Ref)Cell wrappers to deny mutation during spec resolution.

Introduces wrappers around `Cell` and `RefCell` that only allow mutation when we are not in speculative resolution. This is preparatory work for rust-lang#145108.

It would allow us to make `ImportData` and `ModuleData` sync and send safe.

r? `@petrochenkov`
bors added a commit that referenced this pull request Sep 26, 2025
Rollup of 8 pull requests

Successful merges:

 - #146283 (Resolve: (Ref)Cell wrappers to deny mutation during spec resolution.)
 - #146453 (Add general arm-linux.md platform doc.)
 - #146991 (const_caller_location to use real Span instead of `DUMMY_SP`)
 - #146994 (Add `clippy::unconditional_recursion` to `./x clippy ci`)
 - #147027 (Add new `tyalias` intra-doc link disambiguator)
 - #147038 (Rename verbosity functions in bootstrap)
 - #147047 (rustdoc: put the toolbar on the all item index)
 - #147049 (std: fix warning in VEXos stdio module)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Sep 26, 2025
Rollup of 7 pull requests

Successful merges:

 - #146283 (Resolve: (Ref)Cell wrappers to deny mutation during spec resolution.)
 - #146453 (Add general arm-linux.md platform doc.)
 - #146991 (const_caller_location to use real Span instead of `DUMMY_SP`)
 - #146994 (Add `clippy::unconditional_recursion` to `./x clippy ci`)
 - #147038 (Rename verbosity functions in bootstrap)
 - #147047 (rustdoc: put the toolbar on the all item index)
 - #147049 (std: fix warning in VEXos stdio module)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 82e9e54 into rust-lang:master Sep 26, 2025
10 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Sep 26, 2025
rust-timer added a commit that referenced this pull request Sep 26, 2025
Rollup merge of #146283 - LorrensP-2158466:resolve-cm-cell, r=petrochenkov

Resolve: (Ref)Cell wrappers to deny mutation during spec resolution.

Introduces wrappers around `Cell` and `RefCell` that only allow mutation when we are not in speculative resolution. This is preparatory work for #145108.

It would allow us to make `ImportData` and `ModuleData` sync and send safe.

r? ``@petrochenkov``
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