-
Notifications
You must be signed in to change notification settings - Fork 13.9k
resolve: Use primitives for conditional mutability more consistently #147539
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
Conversation
|
r? @SparrowLii rustbot has assigned @SparrowLii. Use |
| // because they can be fetched by glob imports from those modules, and bring traits | ||
| // into scope both directly and through glob imports. | ||
| let key = BindingKey::new_disambiguated(ident, ns, || { | ||
| // FIXME(batched): Will be fixed in batched resolution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed all these scattered FIXMEs in favor of one FIXME on mod ref_mut.
| } | ||
|
|
||
| impl<T: Copy> Clone for CmCell<T> { | ||
| #[inline] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these functions are private and available for optimizer to analyze, no need for #[inline] unless proven by benchmarks.
|
Nice! This makes it more clear what should be migrated and how, thanks! |
|
@bors r+ |
Rollup of 7 pull requests Successful merges: - #146841 (Stabilise `rotate_left` and `rotate_right` in `[_]` as `const fn` items.) - #146949 (Add vsx register support for ppc inline asm, and implement preserves_flag option) - #147539 (resolve: Use primitives for conditional mutability more consistently) - #147685 (remove span calls from deprecated attribute checking) - #147699 (Clairify docs for `AttributeKind::DocComment`) - #147706 (Add myself to review rotation) - #147711 (Clarify that UB will occur, not can/may in GlobalAlloc docs) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #147539 - petrochenkov:cmresolve, r=eholk resolve: Use primitives for conditional mutability more consistently No bare `(Ref)Cell`s remain in `rustc_resolve`, only `Cm(Ref)Cell`s checking that nothing is modified during speculative resolution, and `Cache(Ref)Cell` aliases for cells that need to be migrated to mutexes/atomics. cc `@LorrensP-2158466`
No bare
(Ref)Cells remain inrustc_resolve, onlyCm(Ref)Cells checking that nothing is modified during speculative resolution, andCache(Ref)Cellaliases for cells that need to be migrated to mutexes/atomics.cc @LorrensP-2158466