Skip to content

Commit 906f3b8

Browse files
committed
Mention pointers to ZSTs
1 parent 4e188e3 commit 906f3b8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/advanced_unsafety/invalid_values.md

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ It's also currently invalid for `Vec<T>` to have a null pointer for its buffer!
3434

3535
There are a lot of other reasons that a pointer type may not be valid, but these are the ones where the bit pattern is statically known to be invalid regardless of context. We'll be covering these in more depth in other chapters (@@note: where?), but, for example, all of these pointers must not only be non-null, they must also point to an actual valid instance of that type at all times (except `Vec<T>`, which is allowed to refer to invalid-but-aligned-and-non-null memory when it is empty)
3636

37+
@@ Figure out details for where ZST pointers can point, see https://doc.rust-lang.org/std/ptr/index.html#safety
38+
3739
#### "shallow" vs "deep" validity
3840

3941

0 commit comments

Comments
 (0)