diff options
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)) |
