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