diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-06 23:27:05 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-06 23:27:05 +0100 |
| commit | fd781734843acadb2e3509c2d85e0597e1bdb7e2 (patch) | |
| tree | 5698b73d95f712934dcc015fc8f4f4009a327f42 /src/libcore/alloc.rs | |
| parent | 573e537db5e6af5aab2f9260cb0706815cd11581 (diff) | |
| parent | 292b998c64ed0459b875eac9f5dccb2786a9deca (diff) | |
| download | rust-fd781734843acadb2e3509c2d85e0597e1bdb7e2.tar.gz rust-fd781734843acadb2e3509c2d85e0597e1bdb7e2.zip | |
Rollup merge of #67092 - kraai:us-to-is, r=jonas-schievink
Fix comment typos in src/libcore/alloc.rs
Diffstat (limited to 'src/libcore/alloc.rs')
| -rw-r--r-- | src/libcore/alloc.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/alloc.rs b/src/libcore/alloc.rs index cee9b4eebe6..20248f7f6c1 100644 --- a/src/libcore/alloc.rs +++ b/src/libcore/alloc.rs @@ -137,7 +137,7 @@ impl Layout { #[inline] pub fn for_value<T: ?Sized>(t: &T) -> Self { let (size, align) = (mem::size_of_val(t), mem::align_of_val(t)); - // See rationale in `new` for why this us using an unsafe variant below + // See rationale in `new` for why this is using an unsafe variant below debug_assert!(Layout::from_size_align(size, align).is_ok()); unsafe { Layout::from_size_align_unchecked(size, align) @@ -196,7 +196,7 @@ impl Layout { // valid. // // 2. `len + align - 1` can overflow by at most `align - 1`, - // so the &-mask wth `!(align - 1)` will ensure that in the + // so the &-mask with `!(align - 1)` will ensure that in the // case of overflow, `len_rounded_up` will itself be 0. // Thus the returned padding, when added to `len`, yields 0, // which trivially satisfies the alignment `align`. |
