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:
kennytm 2018-06-28 06:15:43 +08:00 committed by GitHub
commit 99a0d6bf0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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`,