libs: Add {Arc,Rc}::{from,into}_inner_raw, use them in std::thread internals#233
Merged
RyanGlScott merged 1 commit intomasterfrom Feb 2, 2026
Merged
libs: Add {Arc,Rc}::{from,into}_inner_raw, use them in std::thread internals#233RyanGlScott merged 1 commit intomasterfrom
libs: Add {Arc,Rc}::{from,into}_inner_raw, use them in std::thread internals#233RyanGlScott merged 1 commit intomasterfrom
Conversation
RyanGlScott
commented
Jan 23, 2026
| /// replacement for [`from_raw`] (to be used in conjunction with | ||
| /// [`into_inner_raw`]) that is feasible for `crucible-mir` to simulate. | ||
| #[inline] | ||
| #[stable(feature = "rc_raw", since = "1.17.0")] |
Contributor
Author
There was a problem hiding this comment.
I co-opted the same feature (rc_raw) used for {from,into}_raw for these new API functions, as well as for the {Arc,Rc}Inner types. I'm not sure if that's the best way to do this, however.
Contributor
There was a problem hiding this comment.
What's the purpose (actual or intended) of adding this attribute ourselves?
Contributor
Author
There was a problem hiding this comment.
The alloc crate is configured to require publicly-exported entities to be guarded behind some kind of stability attribute. If I try building the crate without this attribute, I run into the following error:
error: associated function has missing stability attribute
--> ./libs/alloc/src/rc.rs:1332:5
|
1332 | pub unsafe fn from_inner_raw(ptr: *const RcInner<T>) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 1 previous error
f5db39d to
09db162
Compare
spernsteiner
approved these changes
Jan 30, 2026
09db162 to
b8178e9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #224.