Skip to content

Commit fd78173

Browse files
authored
Rollup merge of #67092 - kraai:us-to-is, r=jonas-schievink
Fix comment typos in src/libcore/alloc.rs
2 parents 573e537 + 292b998 commit fd78173

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/alloc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl Layout {
137137
#[inline]
138138
pub fn for_value<T: ?Sized>(t: &T) -> Self {
139139
let (size, align) = (mem::size_of_val(t), mem::align_of_val(t));
140-
// See rationale in `new` for why this us using an unsafe variant below
140+
// See rationale in `new` for why this is using an unsafe variant below
141141
debug_assert!(Layout::from_size_align(size, align).is_ok());
142142
unsafe {
143143
Layout::from_size_align_unchecked(size, align)
@@ -196,7 +196,7 @@ impl Layout {
196196
// valid.
197197
//
198198
// 2. `len + align - 1` can overflow by at most `align - 1`,
199-
// so the &-mask wth `!(align - 1)` will ensure that in the
199+
// so the &-mask with `!(align - 1)` will ensure that in the
200200
// case of overflow, `len_rounded_up` will itself be 0.
201201
// Thus the returned padding, when added to `len`, yields 0,
202202
// which trivially satisfies the alignment `align`.

0 commit comments

Comments
 (0)