Skip to content

Commit 1565fc2

Browse files
committedJun 27, 2018
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.
1 parent c208243 commit 1565fc2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎src/libcore/alloc.rs

+2
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ impl Layout {
6767
/// or returns `LayoutErr` if either of the following conditions
6868
/// are not met:
6969
///
70+
/// * `align` must not be zero,
71+
///
7072
/// * `align` must be a power of two,
7173
///
7274
/// * `size`, when rounded up to the nearest multiple of `align`,

0 commit comments

Comments
 (0)
Please sign in to comment.