Skip to content

Commit

Permalink
Mark Layout::new as const stable
Browse files Browse the repository at this point in the history
  • Loading branch information
CAD97 committed Dec 17, 2019
1 parent 6bac693 commit 878d3b3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libcore/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,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>();
Expand Down

0 comments on commit 878d3b3

Please sign in to comment.