Skip to content

Commit d860def

Browse files
committed
Mark Layout::new as const stable
1 parent e47fec5 commit d860def

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
@@ -120,6 +120,7 @@ impl Layout {
120120

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

0 commit comments

Comments
 (0)