]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #51226 - gnzlbg:nonzero_align, r=SimonSapin
authorMark Simulacrum <mark.simulacrum@gmail.com>
Sun, 3 Jun 2018 01:55:06 +0000 (19:55 -0600)
committerGitHub <noreply@github.com>
Sun, 3 Jun 2018 01:55:06 +0000 (19:55 -0600)
Make Layout's align a NonZeroUsize

This PR makes the `Layout`'s align field a `NonZeroUsize` since it cannot ever be zero, not even while building a `Layout`. It also contains some drive-by minor cleanups over the docs and the code, like updating the documented error types, or using the `size()` and `align()` methods instead of accessing the fields directly (the latter was required for the `NonZeroUsize` change anyways).

r? @SimonSapin

cc @Amanieu

1  2 
src/libcore/alloc.rs

Simple merge