Skip to content

Commit

Permalink
Rollup merge of rust-lang#115653 - joshlf:patch-9, r=dtolnay
Browse files Browse the repository at this point in the history
Guarantee that Layout::align returns a non-zero power of two
  • Loading branch information
matthiaskrgr committed Oct 14, 2023
2 parents 139f63a + a9b0966 commit 838b948
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions library/core/src/alloc/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ impl Layout {
}

/// The minimum byte alignment for a memory block of this layout.
///
/// The returned alignment is guaranteed to be a power of two.
#[stable(feature = "alloc_layout", since = "1.28.0")]
#[rustc_const_stable(feature = "const_alloc_layout_size_align", since = "1.50.0")]
#[must_use = "this returns the minimum alignment, \
Expand Down

0 comments on commit 838b948

Please sign in to comment.