Skip to content

Commit

Permalink
Rollup merge of rust-lang#134930 - RalfJung:ptr-docs-valid-access, r=…
Browse files Browse the repository at this point in the history
…jhpratt

ptr docs: make it clear that we are talking only about memory accesses

This should make it harder to take this sentence out of context and misunderstand it.
  • Loading branch information
Zalathar authored Dec 31, 2024
2 parents 50bd1d9 + e36b4c9 commit 111dfb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/core/src/ptr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
//! The precise rules for validity are not determined yet. The guarantees that are
//! provided at this point are very minimal:
//!
//! * For operations of [size zero][zst], *every* pointer is valid, including the [null] pointer.
//! The following points are only concerned with non-zero-sized accesses.
//! * For memory accesses of [size zero][zst], *every* pointer is valid, including the [null]
//! pointer. The following points are only concerned with non-zero-sized accesses.
//! * A [null] pointer is *never* valid.
//! * For a pointer to be valid, it is necessary, but not always sufficient, that the pointer be
//! *dereferenceable*. The [provenance] of the pointer is used to determine which [allocated
Expand Down

0 comments on commit 111dfb1

Please sign in to comment.