-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Implement RefUnwindSafe
for atomic types
#37178
Conversation
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
@bors: r+ cc @rust-lang/libs |
📌 Commit da3b0b8 has been approved by |
@@ -231,6 +231,34 @@ impl<T: ?Sized> RefUnwindSafe for Mutex<T> {} | |||
#[stable(feature = "unwind_safe_lock_refs", since = "1.12.0")] | |||
impl<T: ?Sized> RefUnwindSafe for RwLock<T> {} | |||
|
|||
#[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")] | |||
impl RefUnwindSafe for atomic::AtomicIsize {} | |||
#[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")] |
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.
It doesn't make much sense for this to be marked stable when AtomicI8
is still unstable. I think for the unstable types this should be #[unstable(feature = "integer_atomics", issue = "32976")]
like the others impls for these types.
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.
Good catch. Updated.
Should the impls be placed behind |
@bors: r-
Ah yes, indeed! |
As a side note, there are portions of the standard library that use atomics without the (Obviously not a change to make in this PR.) |
True yeah, this basically just means that libstd won't compile if This seems like a mildly contentious topic on the associated issue, so I'm instead going to... @rfcbot fcp merge |
Team member @alexcrichton has proposed to merge this. The next step is review by the rest of the tagged teams: No concerns currently listed. Once these reviewers reach consensus, this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
🔔 This is now entering its final comment period, as per the review above. 🔔 psst @alexcrichton, I wasn't able to add the |
@bors: r+ |
📌 Commit f832203 has been approved by |
Implement `RefUnwindSafe` for atomic types Closes #37136
Closes #37136