diff options
| author | Dustin Speckhals <dustin1114@gmail.com> | 2017-10-24 19:37:15 -0400 |
|---|---|---|
| committer | Dustin Speckhals <dustin1114@gmail.com> | 2017-10-24 19:37:15 -0400 |
| commit | bca47e42b2c878eafb109c59cf0c8074043c1251 (patch) | |
| tree | 968a99f37f9099c4ed0b68b8020400322e94b667 /src/liballoc/allocator.rs | |
| parent | 69ba6738eb6bf9b6d11ebb81af2599648eb0bc04 (diff) | |
| parent | c2799fc9a5c631a790744ceb9cd08259af338c0c (diff) | |
| download | rust-bca47e42b2c878eafb109c59cf0c8074043c1251.tar.gz rust-bca47e42b2c878eafb109c59cf0c8074043c1251.zip | |
Merge branch 'master' into update-rls-data-for-save-analysis
Diffstat (limited to 'src/liballoc/allocator.rs')
| -rw-r--r-- | src/liballoc/allocator.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/liballoc/allocator.rs b/src/liballoc/allocator.rs index 5a9cd82b9d1..3a2022ad429 100644 --- a/src/liballoc/allocator.rs +++ b/src/liballoc/allocator.rs @@ -70,7 +70,7 @@ impl Layout { /// /// * `align` must be a power of two, /// - /// * `align` must not exceed 2^31 (i.e. `1 << 31`), + /// * `align` must not exceed 2<sup>31</sup> (i.e. `1 << 31`), /// /// * `size`, when rounded up to the nearest multiple of `align`, /// must not overflow (i.e. the rounded value must be less than @@ -113,7 +113,7 @@ impl Layout { /// # Safety /// /// This function is unsafe as it does not verify that `align` is - /// a power-of-two that is also less than or equal to 2^31, nor + /// a power-of-two that is also less than or equal to 2<sup>31</sup>, nor /// that `size` aligned to `align` fits within the address space /// (i.e. the `Layout::from_size_align` preconditions). #[inline] @@ -227,7 +227,7 @@ impl Layout { }; // We can assume that `self.align` is a power-of-two that does - // not exceed 2^31. Furthermore, `alloc_size` has already been + // not exceed 2<sup>31</sup>. Furthermore, `alloc_size` has already been // rounded up to a multiple of `self.align`; therefore, the // call to `Layout::from_size_align` below should never panic. Some((Layout::from_size_align(alloc_size, self.align).unwrap(), padded_size)) |
