Rollup merge of #51842 - rust-lang:align-is-nonzero, r=cramertj
Document that Layout::from_size_align does not allow align=0 This was already implied since zero is not a power of two, but maybe worth pointing out.
This commit is contained in:
commit
99a0d6bf0e
1 changed files with 2 additions and 0 deletions
|
|
@ -67,6 +67,8 @@ impl Layout {
|
|||
/// or returns `LayoutErr` if either of the following conditions
|
||||
/// are not met:
|
||||
///
|
||||
/// * `align` must not be zero,
|
||||
///
|
||||
/// * `align` must be a power of two,
|
||||
///
|
||||
/// * `size`, when rounded up to the nearest multiple of `align`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue