Skip to content

Commit

Permalink
Rollup merge of rust-lang#67092 - kraai:us-to-is, r=jonas-schievink
Browse files Browse the repository at this point in the history
Fix comment typos in src/libcore/alloc.rs
  • Loading branch information
Centril committed Dec 6, 2019
2 parents 573e537 + 292b998 commit fd78173
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libcore/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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`.
Expand Down

0 comments on commit fd78173

Please sign in to comment.