From 13b5af85c57df0898f808651f5126c7fe7568349 Mon Sep 17 00:00:00 2001 From: Joshua Liebow-Feeser Date: Wed, 6 Sep 2023 14:51:37 -0700 Subject: [PATCH] Update pointer.md --- src/types/pointer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/pointer.md b/src/types/pointer.md index afb32ac60..cbbf356e8 100644 --- a/src/types/pointer.md +++ b/src/types/pointer.md @@ -56,7 +56,7 @@ Despite pointers and references being similar to `usize`s in the machine code em the semantics of transmuting a reference or pointer type to a non-pointer type is currently undecided. Thus, it may not be valid to transmute a pointer or reference type, `P`, to a `[u8; size_of::

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