about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/core/src/marker.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs
index ae4ebf44442..26b7dddcd2e 100644
--- a/library/core/src/marker.rs
+++ b/library/core/src/marker.rs
@@ -621,6 +621,12 @@ impl<T: ?Sized> !Sync for *mut T {}
 /// (ideally) or `PhantomData<*const T>` (if no lifetime applies), so
 /// as not to indicate ownership.
 ///
+/// ## Layout
+///
+/// For all `T`, the following are guaranteed:
+/// * `size_of::<PhantomData<T>>() == 0`
+/// * `align_of::<PhantomData<T>>() == 1`
+///
 /// [drop check]: ../../nomicon/dropck.html
 #[lang = "phantom_data"]
 #[stable(feature = "rust1", since = "1.0.0")]