diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-10-03 20:58:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-03 20:58:53 +0200 |
| commit | 098e8b73570e2fc3405f66163ece1858193cd38a (patch) | |
| tree | 653f724165f7d1a1d4efaf259a2d8e1ccd2f07be /compiler/rustc_llvm/llvm-wrapper/Linker.cpp | |
| parent | 33d351972ad9c43bc30e87edd2765de9a4898629 (diff) | |
| parent | 5dcc418f62e14580a319b2b8ec24645abbc1569e (diff) | |
| download | rust-098e8b73570e2fc3405f66163ece1858193cd38a.tar.gz rust-098e8b73570e2fc3405f66163ece1858193cd38a.zip | |
Rollup merge of #98218 - kpreid:nostdarc, r=joshtriplett
Document the conditional existence of `alloc::sync` and `alloc::task`. `alloc` declares ```rust #[cfg(target_has_atomic = "ptr")] pub mod sync; ``` but there is no public documentation of this condition. This PR fixes that, so that users of `alloc` can understand how to make their code compile everywhere `alloc` does, if they are writing a library with impls for `Arc`. The wording is copied from `std::sync::atomic::AtomicPtr`, with additional advice on how to `#[cfg]` for it. I feel quite uncertain about whether the paragraph I added to `Arc`'s documentation should actually be there, as it is a distraction for anyone using `std`. On the other hand, maybe more reminders that no_std exists would benefit the ecosystem. Note: `target_has_atomic` is [stabilized](https://github.com/rust-lang/rust/issues/32976) but [not yet documented in the reference](https://github.com/rust-lang/reference/pull/1171).
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/Linker.cpp')
0 files changed, 0 insertions, 0 deletions
