Skip to content

Document almost all of atomics. #19108

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

Merged
merged 1 commit into from
Nov 20, 2014
Merged

Conversation

steveklabnik
Copy link
Member

I don't know enough about the free functions to give them better docs right now.

@rust-highfive
Copy link
Contributor

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

/// # Examples
///
/// ```
/// use core::atomic::AtomicBool;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The primary interface for these examples is through std::sync, so could these imports be written to use that instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this was the motivation for the IRC discussion. Will update.

@steveklabnik
Copy link
Member Author

Updated!

///
/// ```
/// use std::sync::atomic::AtomicPtr;
/// use std::sync::atomic::Ordering;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also import both of these in the same statement? (use std::sync::atomic::{AtomicPtr, Ordering};), and above as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahhh yeah.

@alexcrichton
Copy link
Member

Thanks @steveklabnik! r=me with one nit

I don't know enough about the free functions to give them better docs right now.
@bors bors merged commit 40aa833 into rust-lang:master Nov 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants