diff options
| author | Alex Saveau <saveau.alexandre@gmail.com> | 2022-11-04 20:28:54 -0700 |
|---|---|---|
| committer | Alex Saveau <saveau.alexandre@gmail.com> | 2022-11-06 12:09:55 -0800 |
| commit | 28ea0023408d9edcc61e89b9f511528e4757a53e (patch) | |
| tree | d8c435b6b6436b7b15ef9b4f9bf3609ff28e5262 | |
| parent | 4827ceecb9ee9bc0508fecf7059bcc134ca187d0 (diff) | |
Add small clarification around using pointers derived from references
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
| -rw-r--r-- | library/core/src/ptr/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs index 565c38d222a..fd6fe46bf50 100644 --- a/library/core/src/ptr/mod.rs +++ b/library/core/src/ptr/mod.rs @@ -35,7 +35,8 @@ //! be used for inter-thread synchronization. //! * The result of casting a reference to a pointer is valid for as long as the //! underlying object is live and no reference (just raw pointers) is used to -//! access the same memory. +//! access the same memory. That is, reference and pointer accesses cannot be +//! interleaved. //! //! These axioms, along with careful use of [`offset`] for pointer arithmetic, //! are enough to correctly implement many useful things in unsafe code. Stronger guarantees @@ -64,7 +65,6 @@ //! separate allocated object), heap allocations (each allocation created by the global allocator is //! a separate allocated object), and `static` variables. //! -//! //! # Strict Provenance //! //! **The following text is non-normative, insufficiently formal, and is an extremely strict |
