Skip to content

Commit 49d14c8

Browse files
committed
docs: don't disallow lowering to stack pop
1 parent ceaef25 commit 49d14c8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

library/core/src/ptr/mod.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1763,10 +1763,11 @@ pub const unsafe fn write_unaligned<T>(dst: *mut T, src: T) {
17631763
/// - When a volatile operation is used for memory inside an [allocation], it behaves exactly like
17641764
/// [`read`], except for the additional guarantee that it won't be elided or reordered (see
17651765
/// above). This implies that the operation will actually access memory and not e.g. be lowered to
1766-
/// a register access or stack pop. Other than that, all the usual rules for memory accesses apply
1767-
/// (including provenance). In particular, just like in C, whether an operation is volatile has no
1768-
/// bearing whatsoever on questions involving concurrent access from multiple threads. Volatile
1769-
/// accesses behave exactly like non-atomic accesses in that regard.
1766+
/// reusing data from a previous read, such as a register that performed a previous load on that
1767+
/// memory. Other than that, all the usual rules for memory accesses apply (including provenance).
1768+
/// In particular, just like in C, whether an operation is volatile has no bearing whatsoever on
1769+
/// questions involving concurrent access from multiple threads. Volatile accesses behave exactly
1770+
/// like non-atomic accesses in that regard.
17701771
///
17711772
/// - Volatile operations, however, may also be used to access memory that is _outside_ of any Rust
17721773
/// allocation. In this use-case, the pointer does *not* have to be [valid] for reads. This is

0 commit comments

Comments
 (0)