Skip to content

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

Merged
bors merged 1 commit into
rust-lang:masterfrom
LorrensP-2158466:resolve-cm-cell
Sep 26, 2025
Merged

Resolve: (Ref)Cell wrappers to deny mutation during spec resolution.#146283
bors merged 1 commit into
rust-lang:masterfrom
LorrensP-2158466:resolve-cm-cell

Conversation

@LorrensP-2158466

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

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

Comment thread compiler/rustc_resolve/src/lib.rs Outdated
Comment thread compiler/rustc_resolve/src/lib.rs Outdated
Comment thread compiler/rustc_resolve/src/lib.rs Outdated
Comment thread compiler/rustc_resolve/src/lib.rs Outdated
Comment thread compiler/rustc_resolve/src/macros.rs Outdated
Comment thread compiler/rustc_resolve/src/lib.rs Outdated
Comment thread compiler/rustc_resolve/src/lib.rs Outdated
Comment thread compiler/rustc_resolve/src/build_reduced_graph.rs Outdated
Comment thread compiler/rustc_resolve/src/build_reduced_graph.rs Outdated
Comment thread compiler/rustc_resolve/src/imports.rs Outdated
@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
Copy Markdown
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
Comment thread compiler/rustc_resolve/src/lib.rs Outdated
Comment thread compiler/rustc_resolve/src/lib.rs
@petrochenkov

Copy link
Copy Markdown
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

rustbot commented Sep 25, 2025

Copy link
Copy Markdown
Collaborator

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

@LorrensP-2158466

Copy link
Copy Markdown
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
Copy Markdown
Contributor

@bors r+

@bors

bors commented Sep 25, 2025

Copy link
Copy Markdown
Collaborator

📌 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``
github-actions Bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Oct 9, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

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

r? `@ghost`
`@rustbot` modify labels: rollup
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request Oct 18, 2025
Rollup of 7 pull requests

Successful merges:

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

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