Skip to content
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

Mention that some atomic operations may not be available on some platforms #72998

Merged
merged 3 commits into from
Jun 7, 2020

Conversation

poliorcetics
Copy link
Contributor

fixes #54250

This simply adds a line saying the type/function/method may not be available on some platforms, depending on said platform capabilities.

I think I got them all.

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 4, 2020
@Mark-Simulacrum
Copy link
Member

@rust-lang/libs -- this seems fine to me, though I don't myself know the details of the support of various atomic types across the platforms we support.

@Amanieu
Copy link
Member

Amanieu commented Jun 5, 2020

I think the message should briefly explain what conditions are required for the type/method to exist on a particular target.

@poliorcetics
Copy link
Contributor Author

I think the message should briefly explain what conditions are required for the type/method to exist on a particular target.

Should I just copy the #[cfg(...)] part ?

@Amanieu
Copy link
Member

Amanieu commented Jun 5, 2020

Something along the lines of "This type is only available on platforms that support atomic loads and stores of $inttype" for the types and "This method is only available on platforms that support atomic operations on $inttype" for methods.

@poliorcetics
Copy link
Contributor Author

Thanks for the suggestion, it helped !

I also moved the **Note**: ... before the examples so it's more visible. When it was after, the doc page made me believe the note was about the next method.

src/libcore/sync/atomic.rs Outdated Show resolved Hide resolved
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
@Amanieu
Copy link
Member

Amanieu commented Jun 6, 2020

@bors r+ rollup

Thanks!

@bors
Copy link
Contributor

bors commented Jun 6, 2020

📌 Commit 5398456 has been approved by Amanieu

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 6, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 7, 2020
Rollup of 5 pull requests

Successful merges:

 - rust-lang#72764 (Be more careful around ty::Error in generators)
 - rust-lang#72908 (rename FalseEdges -> FalseEdge)
 - rust-lang#72970 (Properly handle feature-gated lints)
 - rust-lang#72998 (Mention that some atomic operations may not be available on some platforms)
 - rust-lang#73063 (Elide type on liballoc vec)

Failed merges:

r? @ghost
@bors bors merged commit de1941a into rust-lang:master Jun 7, 2020
@poliorcetics poliorcetics deleted the atomic-availability-doc branch June 7, 2020 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

libcore docs should mention that some atomic operations may not be available
5 participants