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 Jan 9, 2020
1 parent e47fec5 commit d860def
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 @@ -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>();
Expand Down

0 comments on commit d860def

Please sign in to comment.