about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCAD97 <cad97@cad97.com>2019-12-17 14:55:46 -0500
committerCAD97 <cad97@cad97.com>2020-01-09 13:41:43 -0500
commitd860def8e2e2c807c37907c764b937ec35d4f2e6 (patch)
tree8582ecf268d798cb4219229716a51e417a5e837c
parente47fec56dd438c416ce45b06c9b3b23103c4ee3a (diff)
downloadrust-d860def8e2e2c807c37907c764b937ec35d4f2e6.tar.gz
rust-d860def8e2e2c807c37907c764b937ec35d4f2e6.zip
Mark Layout::new as const stable
-rw-r--r--src/libcore/alloc.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libcore/alloc.rs b/src/libcore/alloc.rs
index 37672888d01..163f9170b8b 100644
--- a/src/libcore/alloc.rs
+++ b/src/libcore/alloc.rs
@@ -120,6 +120,7 @@ impl Layout {
 
     /// Constructs a `Layout` suitable for holding a value of type `T`.
     #[stable(feature = "alloc_layout", since = "1.28.0")]
+    #[rustc_const_stable(feature = "alloc_layout_const_new", since = "1.42.0")]
     #[inline]
     pub const fn new<T>() -> Self {
         let (size, align) = size_align::<T>();