Rollup merge of #115653 - joshlf:patch-9, r=dtolnay
Guarantee that Layout::align returns a non-zero power of two
This commit is contained in:
commit
3899957086
@ -130,6 +130,8 @@ pub const fn size(&self) -> usize {
|
||||
}
|
||||
|
||||
/// 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, \
|
||||
|
Loading…
Reference in New Issue
Block a user