Skip to content

Commit 13b5af8

Browse files
authored
Update pointer.md
1 parent ea1110b commit 13b5af8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/types/pointer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Despite pointers and references being similar to `usize`s in the machine code em
5656
the semantics of transmuting a reference or pointer type to a non-pointer type is currently undecided.
5757
Thus, it may not be valid to transmute a pointer or reference type, `P`, to a `[u8; size_of::<P>()]`.
5858

59-
For thin raw pointers (i.e., for `<T as Pointee>::Metadata == ()` and `P = *const T` or `P = *mut T`),
59+
For thin raw pointers (i.e., for `P = *const T` or `P = *mut T` for `T: Sized`),
6060
the inverse direction (transmuting from an integer or array of integers to `P`) is always valid.
6161
However, the pointer produced via such a transmutation may not be dereferenced (not even if `T` has size zero).
6262

0 commit comments

Comments
 (0)