Skip to content

Commit 26faaa3

Browse files
committed
Auto merge of rust-lang#3504 - forcedebug:master, r=RalfJung
chore: fix some typos in comments
2 parents 579940c + 15a1b0d commit 26faaa3

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

src/tools/miri/src/borrow_tracker/stacked_borrows/stack.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ impl<'tcx> Stack {
248248
#[cfg(feature = "stack-cache")]
249249
fn find_granting_cache(&mut self, access: AccessKind, tag: BorTag) -> Option<usize> {
250250
// This looks like a common-sense optimization; we're going to do a linear search of the
251-
// cache or the borrow stack to scan the shorter of the two. This optimization is miniscule
251+
// cache or the borrow stack to scan the shorter of the two. This optimization is minuscule
252252
// and this check actually ensures we do not access an invalid cache.
253253
// When a stack is created and when items are removed from the top of the borrow stack, we
254254
// need some valid value to populate the cache. In both cases, we try to use the bottom

src/tools/miri/src/shims/windows/foreign_items.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
653653
OsStr::new(&formatted),
654654
buffer,
655655
size.into(),
656-
/*trunacte*/ false,
656+
/*truncate*/ false,
657657
)?;
658658
if !complete {
659659
// The API docs don't say what happens when the buffer is not big enough...

src/tools/miri/src/shims/x86/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ fn convert_float_to_int<'tcx>(
650650
let dest = this.project_index(&dest, i)?;
651651

652652
let res = this.float_to_int_checked(&op, dest.layout, rnd)?.unwrap_or_else(|| {
653-
// Fallback to minimum acording to SSE/AVX semantics.
653+
// Fallback to minimum according to SSE/AVX semantics.
654654
ImmTy::from_int(dest.layout.size.signed_int_min(), dest.layout)
655655
});
656656
this.write_immediate(*res, &dest)?;

src/tools/miri/src/shims/x86/sse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ pub(super) trait EvalContextExt<'mir, 'tcx: 'mir>:
182182
};
183183

184184
let res = this.float_to_int_checked(&op, dest.layout, rnd)?.unwrap_or_else(|| {
185-
// Fallback to minimum acording to SSE semantics.
185+
// Fallback to minimum according to SSE semantics.
186186
ImmTy::from_int(dest.layout.size.signed_int_min(), dest.layout)
187187
});
188188

src/tools/miri/src/shims/x86/sse2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ pub(super) trait EvalContextExt<'mir, 'tcx: 'mir>:
420420
};
421421

422422
let res = this.float_to_int_checked(&op, dest.layout, rnd)?.unwrap_or_else(|| {
423-
// Fallback to minimum acording to SSE semantics.
423+
// Fallback to minimum according to SSE semantics.
424424
ImmTy::from_int(dest.layout.size.signed_int_min(), dest.layout)
425425
});
426426

@@ -447,7 +447,7 @@ pub(super) trait EvalContextExt<'mir, 'tcx: 'mir>:
447447
let res0 = this.float_to_float_or_int(&right0, dest0.layout)?;
448448
this.write_immediate(*res0, &dest0)?;
449449

450-
// Copy remianing from `left`
450+
// Copy remaining from `left`
451451
for i in 1..dest_len {
452452
this.copy_op(&this.project_index(&left, i)?, &this.project_index(&dest, i)?)?;
453453
}

src/tools/miri/tests/pass/const-addrs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// deallocated.
55
// In Miri we explicitly store previously-assigned AllocIds for each const and ensure
66
// that we only hand out a finite number of AllocIds per const.
7-
// MIR inlining will put every evaluation of the const we're repeatedly evaluting into the same
7+
// MIR inlining will put every evaluation of the const we're repeatedly evaluating into the same
88
// stack frame, breaking this test.
99
//@compile-flags: -Zinline-mir=no
1010
#![feature(strict_provenance)]

src/tools/miri/tests/pass/issues/issue-miri-1909.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::alloc::System;
99
/// `ptr` must be valid for writes of `len` bytes
1010
unsafe fn volatile_write_zeroize_mem(ptr: *mut u8, len: usize) {
1111
for i in 0..len {
12-
// ptr as usize + i can't overlow because `ptr` is valid for writes of `len`
12+
// ptr as usize + i can't overflow because `ptr` is valid for writes of `len`
1313
let ptr_new: *mut u8 = ((ptr as usize) + i) as *mut u8;
1414
// SAFETY: `ptr` is valid for writes of `len` bytes, so `ptr_new` is valid for a
1515
// byte write

0 commit comments

Comments
 (0)