Skip to content

Commit 878d3b3

Browse files
committed
Mark Layout::new as const stable
1 parent 6bac693 commit 878d3b3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libcore/alloc.rs

+1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ impl Layout {
118118

119119
/// Constructs a `Layout` suitable for holding a value of type `T`.
120120
#[stable(feature = "alloc_layout", since = "1.28.0")]
121+
#[rustc_const_stable(feature = "alloc_layout_const_new", since = "1.42.0")]
121122
#[inline]
122123
pub const fn new<T>() -> Self {
123124
let (size, align) = size_align::<T>();

0 commit comments

Comments
 (0)