Skip to content

Commit 098bec8

Browse files
committed
clarify that these are preliminary guarantees
1 parent b0c5dc2 commit 098bec8

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/libcore/ptr.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
//! to access only a single value, in which case the documentation omits the size
2525
//! and implicitly assumes it to be `size_of::<T>()` bytes.
2626
//!
27-
//! While we can't yet define whether an arbitrary pointer is valid, there
28-
//! are a few rules regarding validity:
27+
//! The precise rules for validity are not determined yet. The guarantees that are
28+
//! provided at this point are very minimal:
2929
//!
3030
//! * A [null] pointer is *never* valid, not even for accesses of [size zero][zst].
3131
//! * All pointers (except for the null pointer) are valid for all operations of
@@ -35,9 +35,8 @@
3535
//! access the same memory.
3636
//!
3737
//! These axioms, along with careful use of [`offset`] for pointer arithmentic,
38-
//! are enough to correctly implement many useful things in unsafe code. Still,
39-
//! unsafe code should be carefully examined since some of the finer
40-
//! details—notably the [aliasing] rules—are not yet settled. For more
38+
//! are enough to correctly implement many useful things in unsafe code. Stronger guarantees
39+
//! will be provided eventually, as the [aliasing] rules are being determined. For more
4140
//! information, see the [book] as well as the section in the reference devoted
4241
//! to [undefined behavior][ub].
4342
//!

0 commit comments

Comments
 (0)