Skip to content

Commit 308ff4d

Browse files
committed
docs: deduplicate comment on ZSTs
1 parent a4761b7 commit 308ff4d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

library/core/src/ptr/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2056,10 +2056,8 @@ pub const unsafe fn write_unaligned<T>(dst: *mut T, src: T) {
20562056
/// irrelevant, and it can be created with [`without_provenance`]. The access must not trap. It
20572057
/// can cause side-effects, but those must not affect Rust-allocated memory in in any way. This
20582058
/// access is still not considered [atomic], and as such it cannot be used for inter-thread
2059-
/// synchronization.
2060-
///
2061-
/// Note that volatile memory operations on zero-sized types (e.g., if a zero-sized type is passed
2062-
/// to `read_volatile`) are noops and may be ignored.
2059+
/// synchronization. Note that volatile memory operations where T is a zero-sized type are noops
2060+
/// and may be ignored.
20632061
///
20642062
/// [c11]: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf
20652063
/// [allocation]: crate::ptr#allocated-object

0 commit comments

Comments
 (0)