We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 405e48f + 72a9029 commit 08653c8Copy full SHA for 08653c8
library/core/src/marker.rs
@@ -623,6 +623,12 @@ impl<T: ?Sized> !Sync for *mut T {}
623
/// (ideally) or `PhantomData<*const T>` (if no lifetime applies), so
624
/// as not to indicate ownership.
625
///
626
+/// ## Layout
627
+///
628
+/// For all `T`, the following are guaranteed:
629
+/// * `size_of::<PhantomData<T>>() == 0`
630
+/// * `align_of::<PhantomData<T>>() == 1`
631
632
/// [drop check]: ../../nomicon/dropck.html
633
#[lang = "phantom_data"]
634
#[stable(feature = "rust1", since = "1.0.0")]
0 commit comments