Skip to content

Commit

Permalink
Mark core::alloc::Layout::from_size_align_unchecked const
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard-W committed May 14, 2019
1 parent 80e7cde commit a7a0520
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl Layout {
/// [`Layout::from_size_align`](#method.from_size_align).
#[stable(feature = "alloc_layout", since = "1.28.0")]
#[inline]
pub unsafe fn from_size_align_unchecked(size: usize, align: usize) -> Self {
pub const unsafe fn from_size_align_unchecked(size: usize, align: usize) -> Self {
Layout { size_: size, align_: NonZeroUsize::new_unchecked(align) }
}

Expand Down

0 comments on commit a7a0520

Please sign in to comment.