diff options
| author | Christopher Durham <cad97@cad97.com> | 2019-11-25 16:39:24 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-25 16:39:24 -0500 |
| commit | d1e53da80992d27073b3e918bd56d6c0692f160c (patch) | |
| tree | 7e0e0f451e5194ba20b553285f05400b21c419e3 | |
| parent | 6773064b0529c258c4f69bb7848371553447b088 (diff) | |
Clarify Layout::pad_to_align safety comment
| -rw-r--r-- | src/libcore/alloc.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/alloc.rs b/src/libcore/alloc.rs index 68fa2b5c20d..4798769823f 100644 --- a/src/libcore/alloc.rs +++ b/src/libcore/alloc.rs @@ -219,7 +219,7 @@ impl Layout { #[inline] pub fn pad_to_align(&self) -> Layout { let pad = self.padding_needed_for(self.align()); - // This cannot overflow: it is an invariant of Layout that + // This cannot overflow. Quoting from the invariant of Layout: // > `size`, when rounded up to the nearest multiple of `align`, // > must not overflow (i.e., the rounded value must be less than // > `usize::MAX`) |
