about summary refs log tree commit diff
path: root/library/core/src/mem
diff options
context:
space:
mode:
authorBen Kimock <kimockb@gmail.com>2024-06-21 12:28:03 -0400
committerBen Kimock <ben.kimock@redjack.com>2024-08-09 20:06:26 -0400
commitd6c0ebef5089407eefbd45199f1dbcf65ee2d0c6 (patch)
tree8720f1eb35d233abcc8861adfa299656025f8947 /library/core/src/mem
parentca5d25e2c41f5a6b4ce65c681bf2f94c7ead1f14 (diff)
downloadrust-d6c0ebef5089407eefbd45199f1dbcf65ee2d0c6.tar.gz
rust-d6c0ebef5089407eefbd45199f1dbcf65ee2d0c6.zip
Polymorphize RawVec
Diffstat (limited to 'library/core/src/mem')
-rw-r--r--library/core/src/mem/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/library/core/src/mem/mod.rs b/library/core/src/mem/mod.rs
index ea2dcdce6e8..7a9ca4011be 100644
--- a/library/core/src/mem/mod.rs
+++ b/library/core/src/mem/mod.rs
@@ -5,6 +5,7 @@
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
+use crate::alloc::Layout;
 use crate::marker::DiscriminantKind;
 use crate::{clone, cmp, fmt, hash, intrinsics, ptr};
 
@@ -1238,6 +1239,10 @@ pub trait SizedTypeProperties: Sized {
     #[doc(hidden)]
     #[unstable(feature = "sized_type_properties", issue = "none")]
     const IS_ZST: bool = size_of::<Self>() == 0;
+
+    #[doc(hidden)]
+    #[unstable(feature = "sized_type_properties", issue = "none")]
+    const LAYOUT: Layout = Layout::new::<Self>();
 }
 #[doc(hidden)]
 #[unstable(feature = "sized_type_properties", issue = "none")]