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

Merged
merged 1 commit into from Nov 1, 2016

Conversation

Projects
None yet
7 participants
@apasel422
Copy link
Member

apasel422 commented Oct 14, 2016

Closes #37136

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Oct 14, 2016

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Oct 14, 2016

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Oct 14, 2016

📌 Commit da3b0b8 has been approved by alexcrichton

@@ -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")]

This comment has been minimized.

@ollie27

ollie27 Oct 15, 2016

Contributor

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.

This comment has been minimized.

@apasel422

apasel422 Oct 15, 2016

Member

Good catch. Updated.

@apasel422

This comment has been minimized.

Copy link
Member

apasel422 commented Oct 15, 2016

Should the impls be placed behind #[cfg(target_has_atomic = "x")]?

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Oct 16, 2016

@bors: r-

Should the impls be placed behind

Ah yes, indeed!

@apasel422

This comment has been minimized.

Copy link
Member

apasel422 commented Oct 16, 2016

As a side note, there are portions of the standard library that use atomics without the #[cfg(target_has_atomic = "x")] (most notably Arc and sync::mpsc). Should they be defined conditionally as well? Or does std assume/require their existence?

(Obviously not a change to make in this PR.)

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Oct 17, 2016

As a side note, there are portions of the standard library that use atomics without the #[cfg(target_has_atomic = "x")]

True yeah, this basically just means that libstd won't compile if AtomicUsize isn't available (intentional).

This seems like a mildly contentious topic on the associated issue, so I'm instead going to...

@rfcbot fcp merge

@alexcrichton alexcrichton added the T-libs label Oct 17, 2016

@rfcbot

This comment has been minimized.

Copy link

rfcbot commented Oct 17, 2016

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.

@rfcbot

This comment has been minimized.

Copy link

rfcbot commented Oct 31, 2016

🔔 This is now entering its final comment period, as per the review above. 🔔

psst @alexcrichton, I wasn't able to add the final-comment-period label, please do so.

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Oct 31, 2016

@bors: r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Oct 31, 2016

📌 Commit f832203 has been approved by alexcrichton

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 1, 2016

⌛️ Testing commit f832203 with merge 73f5cad...

bors added a commit that referenced this pull request Nov 1, 2016

Auto merge of #37178 - apasel422:issue-37136, r=alexcrichton
Implement `RefUnwindSafe` for atomic types

Closes #37136

@bors bors merged commit f832203 into rust-lang:master Nov 1, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

@apasel422 apasel422 deleted the apasel422:issue-37136 branch Nov 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment