diff options
| author | bors <bors@rust-lang.org> | 2022-03-31 17:45:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-03-31 17:45:26 +0000 |
| commit | 0677edc86e342f333d4828b0ee1ef395a4e70fe5 (patch) | |
| tree | 56ff127af90384d75ba662e6f8cd7633bf1e20a1 /library/core/src | |
| parent | bd1a8692f6260fd59dba1e0fa187092a1c354b2e (diff) | |
| parent | 1074c814af33dfef7007ae261aecfff368bb80a1 (diff) | |
| download | rust-0677edc86e342f333d4828b0ee1ef395a4e70fe5.tar.gz rust-0677edc86e342f333d4828b0ee1ef395a4e70fe5.zip | |
Auto merge of #95526 - Dylan-DPC:rollup-0ikl5l5, r=Dylan-DPC
Rollup of 5 pull requests Successful merges: - #91416 (Specialize infinite-type "insert some indirection" suggestion for Option) - #95384 (Update target_has_atomic documentation for stabilization) - #95517 (small rustc_borrowck cleanup) - #95520 (Fix typos in core::ptr docs) - #95523 (remove unused field from `infcx`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/core/src')
| -rw-r--r-- | library/core/src/ptr/mod.rs | 8 | ||||
| -rw-r--r-- | library/core/src/sync/atomic.rs | 7 |
2 files changed, 8 insertions, 7 deletions
diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs index 6a7841d3de6..68d80022b4c 100644 --- a/library/core/src/ptr/mod.rs +++ b/library/core/src/ptr/mod.rs @@ -84,7 +84,7 @@ //! have to change, and is it worse or better now? Would any patterns become truly inexpressible? //! Could we carve out special exceptions for those patterns? Should we? //! -//! A secondary goal of this project is to see if we can disamiguate the many functions of +//! A secondary goal of this project is to see if we can disambiguate the many functions of //! pointer<->integer casts enough for the definition of `usize` to be loosened so that it //! isn't *pointer*-sized but address-space/offset/allocation-sized (we'll probably continue //! to conflate these notions). This would potentially make it possible to more efficiently @@ -163,7 +163,7 @@ //! of pointers and `usize` (and `isize`), and defining a pointer to semantically contain the //! following information: //! -//! * The **address-space** it is part of (i.e. "data" vs "code" in WASM). +//! * The **address-space** it is part of (e.g. "data" vs "code" in WASM). //! * The **address** it points to, which can be represented by a `usize`. //! * The **provenance** it has, defining the memory it has permission to access. //! @@ -246,7 +246,7 @@ //! be using AtomicPtr instead. If that messes up the way you atomically manipulate pointers, //! we would like to know why, and what needs to be done to fix it.) //! -//! Something more complicated and just generally *evil* like a XOR-List requires more significant +//! Something more complicated and just generally *evil* like an XOR-List requires more significant //! changes like allocating all nodes in a pre-allocated Vec or Arena and using a pointer //! to the whole allocation to reconstitute the XORed addresses. //! @@ -257,7 +257,7 @@ //! special attention at all, because they're generally accessing memory outside the scope of //! "the abstract machine", or already using "I know what I'm doing" annotations like "volatile". //! -//! Under [Strict Provenance] is is Undefined Behaviour to: +//! Under [Strict Provenance] it is Undefined Behaviour to: //! //! * Access memory through a pointer that does not have provenance over that memory. //! diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs index a9edec80540..c11a35ab947 100644 --- a/library/core/src/sync/atomic.rs +++ b/library/core/src/sync/atomic.rs @@ -65,9 +65,10 @@ //! For reference, the `std` library requires `AtomicBool`s and pointer-sized atomics, although //! `core` does not. //! -//! Currently you'll need to use `#[cfg(target_arch)]` primarily to -//! conditionally compile in code with atomics. There is an unstable -//! `#[cfg(target_has_atomic)]` as well which may be stabilized in the future. +//! The `#[cfg(target_has_atomic)]` attribute can be used to conditionally +//! compile based on the target's supported bit widths. It is a key-value +//! option set for each supported size, with values "8", "16", "32", "64", +//! "128", and "ptr" for pointer-sized atomics. //! //! [lock-free]: https://en.wikipedia.org/wiki/Non-blocking_algorithm //! |
