diff options
| author | kennytm <kennytm@gmail.com> | 2018-06-28 06:15:43 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-28 06:15:43 +0800 |
| commit | 99a0d6bf0e478f7ad0dd06ccf2c4d83da69d3167 (patch) | |
| tree | 4652741d9b3cfe4e0d801a0da8af82a5f138ef94 | |
| parent | 7f4347f8e2845a2a4fbe97ce776518b5027bd026 (diff) | |
| parent | 1565fc21205cf6f589c89732babc6991a7baaee8 (diff) | |
| download | rust-99a0d6bf0e478f7ad0dd06ccf2c4d83da69d3167.tar.gz rust-99a0d6bf0e478f7ad0dd06ccf2c4d83da69d3167.zip | |
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.
| -rw-r--r-- | src/libcore/alloc.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcore/alloc.rs b/src/libcore/alloc.rs index 0c074582281..91447e01ad4 100644 --- a/src/libcore/alloc.rs +++ b/src/libcore/alloc.rs @@ -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`, |
