Skip to content

Commit 8c1a670

Browse files
chore: fix typos
1 parent 8cdc67e commit 8c1a670

File tree

36 files changed

+41
-41
lines changed

36 files changed

+41
-41
lines changed

src/bootstrap/src/core/build_steps/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2637,7 +2637,7 @@ fn prepare_cargo_test(
26372637
) -> BootstrapCommand {
26382638
let mut cargo = cargo.into();
26392639

2640-
// Propegate `--bless` if it has not already been set/unset
2640+
// Propagate `--bless` if it has not already been set/unset
26412641
// Any tools that want to use this should bless if `RUSTC_BLESS` is set to
26422642
// anything other than `0`.
26432643
if builder.config.cmd.bless() && !cargo.get_envs().any(|v| v.0 == "RUSTC_BLESS") {

src/bootstrap/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1691,7 +1691,7 @@ Executed at: {executed_at}"#,
16911691
}
16921692
}
16931693
if let Ok(()) = fs::hard_link(&src, dst) {
1694-
// Attempt to "easy copy" by creating a hard link (symlinks are priviledged on windows),
1694+
// Attempt to "easy copy" by creating a hard link (symlinks are privileged on windows),
16951695
// but if that fails just fall back to a slow `copy` operation.
16961696
} else {
16971697
if let Err(e) = fs::copy(&src, dst) {

src/bootstrap/src/utils/tarball.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Facilitates the management and generation of tarballs.
22
//!
33
//! Tarballs efficiently hold Rust compiler build artifacts and
4-
//! capture a snapshot of each boostrap stage.
4+
//! capture a snapshot of each bootstrap stage.
55
//! In uplifting, a tarball from Stage N captures essential components
66
//! to assemble Stage N + 1 compiler.
77

src/ci/scripts/install-clang.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ LLVM_VERSION="18.1.4"
1515

1616
if isMacOS; then
1717
# FIXME: This is the latest pre-built version of LLVM that's available for
18-
# x86_64 MacOS. We may want to consider bulding our own LLVM binaries
18+
# x86_64 MacOS. We may want to consider building our own LLVM binaries
1919
# instead, or set `USE_XCODE_CLANG` like AArch64 does.
2020
LLVM_VERSION="15.0.7"
2121

src/tools/linkchecker/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//!
99
//! Currently uses a combination of HTML parsing to
1010
//! extract the `href` and `id` attributes,
11-
//! and regex search on the orignal markdown to handle intra-doc links.
11+
//! and regex search on the original markdown to handle intra-doc links.
1212
//!
1313
//! These values are then translated to file URLs if possible and then the
1414
//! destination is asserted to exist.

src/tools/miri/cargo-miri/src/phases.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ pub fn phase_rustc(mut args: impl Iterator<Item = String>, phase: RustcPhase) {
283283
fn is_runnable_crate() -> bool {
284284
// Determine whether this is cargo invoking rustc to get some infos. Ideally we'd check "is
285285
// there a filename passed to rustc", but that's very hard as we would have to know whether
286-
// e.g. `--print foo` is a booolean flag `--print` followed by filename `foo` or equivalent
286+
// e.g. `--print foo` is a boolean flag `--print` followed by filename `foo` or equivalent
287287
// to `--print=foo`. So instead we use this more fragile approach of detecting the presence
288288
// of a "query" flag rather than the absence of a filename.
289289
let info_query = get_arg_flag_value("--print").is_some() || has_arg_flag("-vV");

src/tools/miri/miri-script/src/commands.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ impl Command {
493493
// Compare results (inspired by hyperfine)
494494
let ratio = new_result.mean / baseline_result.mean;
495495
// https://en.wikipedia.org/wiki/Propagation_of_uncertainty#Example_formulae
496-
// Covariance asssumed to be 0, i.e. variables are assumed to be independent
496+
// Covariance assumed to be 0, i.e. variables are assumed to be independent
497497
let ratio_stddev = ratio
498498
* f64::sqrt(
499499
(new_result.stddev / new_result.mean).powi(2)

src/tools/miri/miri-script/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pub enum Command {
107107
},
108108
/// Update and activate the rustup toolchain 'miri'.
109109
///
110-
/// The `rust-version` file is used to determine the commit that will be intsalled.
110+
/// The `rust-version` file is used to determine the commit that will be installed.
111111
/// `rustup-toolchain-install-master` must be installed for this to work.
112112
Toolchain {
113113
/// Flags that are passed through to `rustup-toolchain-install-master`.

src/tools/miri/src/borrow_tracker/tree_borrows/perms.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ pub mod diagnostics {
530530
// - created as Reserved { conflicted: false },
531531
// then Active -> Disabled is forbidden
532532
// A potential `Reserved { conflicted: false }
533-
// -> Reserved { conflicted: true }` is inexistant or irrelevant,
533+
// -> Reserved { conflicted: true }` is inexistent or irrelevant,
534534
// and so is the `Reserved { conflicted: false } -> Active`
535535
(Active, Frozen) => false,
536536
(ReservedFrz { conflicted: true }, _) => false,

src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ impl LocationState {
201201

202202
/// Records a new access, so that future access can potentially be skipped
203203
/// by `skip_if_known_noop`. This must be called on child accesses, and otherwise
204-
/// shoud be called on foreign accesses for increased performance. It should not be called
204+
/// should be called on foreign accesses for increased performance. It should not be called
205205
/// when `skip_if_known_noop` indicated skipping, since it then is a no-op.
206206
/// See `foreign_access_skipping.rs`
207207
fn record_new_access(&mut self, access_kind: AccessKind, rel_pos: AccessRelatedness) {

src/tools/miri/src/borrow_tracker/tree_borrows/tree/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ mod spurious_read {
742742
);
743743
eprintln!(" (arbitrary code instanciated with '{}')", opaque);
744744
err += 1;
745-
// We found an instanciation of the opaque code that makes this Pattern
745+
// We found an instantiation of the opaque code that makes this Pattern
746746
// fail, we don't really need to check the rest.
747747
break;
748748
}

src/tools/miri/src/concurrency/data_race.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ impl AccessType {
362362

363363
if let Some(size) = size {
364364
if size == Size::ZERO {
365-
// In this case there were multiple read accesss with different sizes and then a write.
365+
// In this case there were multiple read access with different sizes and then a write.
366366
// We will be reporting *one* of the other reads, but we don't have enough information
367367
// to determine which one had which size.
368368
assert!(self == AccessType::AtomicLoad);
@@ -1355,7 +1355,7 @@ trait EvalContextPrivExt<'tcx>: MiriInterpCxExt<'tcx> {
13551355
let align = Align::from_bytes(place.layout.size.bytes()).unwrap();
13561356
this.check_ptr_align(place.ptr(), align)?;
13571357
// Ensure the allocation is mutable. Even failing (read-only) compare_exchange need mutable
1358-
// memory on many targets (i.e., they segfault if taht memory is mapped read-only), and
1358+
// memory on many targets (i.e., they segfault if that memory is mapped read-only), and
13591359
// atomic loads can be implemented via compare_exchange on some targets. There could
13601360
// possibly be some very specific exceptions to this, see
13611361
// <https://github.com/rust-lang/miri/pull/2464#discussion_r939636130> for details.

src/tools/miri/src/concurrency/thread.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub trait UnblockCallback<'tcx>: VisitProvenance {
4444
/// i.e. whatever event it was blocking on has happened.
4545
fn unblock(self: Box<Self>, ecx: &mut InterpCx<'tcx, MiriMachine<'tcx>>) -> InterpResult<'tcx>;
4646

47-
/// Will be invoked when the timeout ellapsed without the event the
47+
/// Will be invoked when the timeout elapsed without the event the
4848
/// thread was blocking on having occurred.
4949
fn timeout(self: Box<Self>, _ecx: &mut InterpCx<'tcx, MiriMachine<'tcx>>)
5050
-> InterpResult<'tcx>;
@@ -648,7 +648,7 @@ impl<'tcx> ThreadManager<'tcx> {
648648
self.active_thread, joined_thread_id
649649
);
650650
// The joined thread is still running, we need to wait for it.
651-
// Unce we get unblocked, perform the appropriate synchronization.
651+
// Once we get unblocked, perform the appropriate synchronization.
652652
self.block_thread(
653653
BlockReason::Join(joined_thread_id),
654654
None,

src/tools/miri/src/concurrency/weak_memory.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
// (https://github.com/ChrisLidbury/tsan11/blob/ecbd6b81e9b9454e01cba78eb9d88684168132c7/lib/tsan/rtl/tsan_relaxed.cc#L160-L167)
7878
// and here.
7979
//
80-
// 4. W_SC ; R_SC case requires the SC load to ignore all but last store maked SC (stores not marked SC are not
80+
// 4. W_SC ; R_SC case requires the SC load to ignore all but last store marked SC (stores not marked SC are not
8181
// affected). But this rule is applied to all loads in ReadsFromSet from the paper (last two lines of code), not just SC load.
8282
// This is implemented correctly in tsan11
8383
// (https://github.com/ChrisLidbury/tsan11/blob/ecbd6b81e9b9454e01cba78eb9d88684168132c7/lib/tsan/rtl/tsan_relaxed.cc#L295)
@@ -371,7 +371,7 @@ impl<'tcx> StoreBuffer {
371371
})
372372
.filter(|&store_elem| {
373373
if is_seqcst && store_elem.is_seqcst {
374-
// An SC load needs to ignore all but last store maked SC (stores not marked SC are not
374+
// An SC load needs to ignore all but last store marked SC (stores not marked SC are not
375375
// affected)
376376
let include = !found_sc;
377377
found_sc = true;

src/tools/miri/src/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ pub fn report_error<'tcx>(
390390
let mut show_all_threads = false;
391391

392392
// We want to dump the allocation if this is `InvalidUninitBytes`.
393-
// Since `format_interp_error` consumes `e`, we compute the outut early.
393+
// Since `format_interp_error` consumes `e`, we compute the output early.
394394
let mut extra = String::new();
395395
match e.kind() {
396396
UndefinedBehavior(InvalidUninitBytes(Some((alloc_id, access)))) => {

src/tools/miri/src/machine.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1565,7 +1565,7 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
15651565
if ecx.machine.borrow_tracker.is_some() {
15661566
ecx.on_stack_pop(frame)?;
15671567
}
1568-
// tracing-tree can autoamtically annotate scope changes, but it gets very confused by our
1568+
// tracing-tree can automatically annotate scope changes, but it gets very confused by our
15691569
// concurrency and what it prints is just plain wrong. So we print our own information
15701570
// instead. (Cc https://github.com/rust-lang/miri/issues/2266)
15711571
info!("Leaving {}", ecx.frame().instance());

src/tools/miri/src/shims/os_str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
316316
// The new path is still absolute on Windows.
317317
path.remove(0);
318318
}
319-
// If this starts withs a `\` but not a `\\`, then this was absolute on Unix but is
319+
// If this starts with a `\` but not a `\\`, then this was absolute on Unix but is
320320
// relative on Windows (relative to "the root of the current directory", e.g. the
321321
// drive letter).
322322
else if path.first() == Some(&sep) && path.get(1) != Some(&sep) {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
847847
this.tcx.sess.target.os
848848
);
849849
}
850-
// This function looks and behaves excatly like miri_start_unwind.
850+
// This function looks and behaves exactly like miri_start_unwind.
851851
let [payload] = this.check_shim(abi, Conv::C, link_name, args)?;
852852
this.handle_miri_start_unwind(payload)?;
853853
return interp_ok(EmulateItemResult::NeedsUnwind);

src/tools/miri/src/shims/unix/linux/foreign_items.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
8585
)? {
8686
ThreadNameResult::Ok => Scalar::from_u32(0),
8787
ThreadNameResult::NameTooLong => this.eval_libc("ERANGE"),
88-
// Act like we faild to open `/proc/self/task/$tid/comm`.
88+
// Act like we failed to open `/proc/self/task/$tid/comm`.
8989
ThreadNameResult::ThreadNotFound => this.eval_libc("ENOENT"),
9090
};
9191
this.write_scalar(res, dest)?;
@@ -105,7 +105,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
105105
)? {
106106
ThreadNameResult::Ok => Scalar::from_u32(0),
107107
ThreadNameResult::NameTooLong => unreachable!(),
108-
// Act like we faild to open `/proc/self/task/$tid/comm`.
108+
// Act like we failed to open `/proc/self/task/$tid/comm`.
109109
ThreadNameResult::ThreadNotFound => this.eval_libc("ENOENT"),
110110
}
111111
} else {

src/tools/miri/src/shims/unix/macos/sync.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
4040
// but then any future attempt to unlock will just deadlock. In practice, terrible
4141
// things can probably happen if you swap two locked locks, since they'd wake up
4242
// from the wrong queue... we just won't catch all UB of this library API then (we
43-
// would need to store some unique identifer in-memory for this, instead of a static
43+
// would need to store some unique identifier in-memory for this, instead of a static
4444
// LAZY_INIT_COOKIE). This can't be hit via `std::sync::Mutex`.
4545
interp_ok(MacOsUnfairLock::Poisoned)
4646
},

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
767767
"`_Unwind_RaiseException` is not supported on non-MinGW Windows",
768768
);
769769
}
770-
// This function looks and behaves excatly like miri_start_unwind.
770+
// This function looks and behaves exactly like miri_start_unwind.
771771
let [payload] = this.check_shim(abi, Conv::C, link_name, args)?;
772772
this.handle_miri_start_unwind(payload)?;
773773
return interp_ok(EmulateItemResult::NeedsUnwind);

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
4444
)
4545
}
4646

47-
/// Returns `true` if we were succssful, `false` if we would block.
47+
/// Returns `true` if we were successful, `false` if we would block.
4848
fn init_once_try_begin(
4949
&mut self,
5050
id: InitOnceId,

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
209209
}
210210
// Used to implement the _mm256_permute2f128_ps, _mm256_permute2f128_pd and
211211
// _mm256_permute2f128_si256 functions. Regardless of the suffix in the name
212-
// thay all can be considered to operate on vectors of 128-bit elements.
212+
// they all can be considered to operate on vectors of 128-bit elements.
213213
// For each 128-bit element of `dest`, copies one from `left`, `right` or
214214
// zero, according to `imm`.
215215
"vperm2f128.ps.256" | "vperm2f128.pd.256" | "vperm2f128.si.256" => {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
374374
// Used to implement the _mm256_sign_epi{8,16,32} functions.
375375
// Negates elements from `left` when the corresponding element in
376376
// `right` is negative. If an element from `right` is zero, zero
377-
// is writen to the corresponding output element.
377+
// is written to the corresponding output element.
378378
// Basically, we multiply `left` with `right.signum()`.
379379
"psign.b" | "psign.w" | "psign.d" => {
380380
let [left, right] = this.check_shim(abi, Conv::C, link_name, args)?;

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
4242
let right = if is_64_bit { right.to_u64()? } else { u64::from(right.to_u32()?) };
4343

4444
let result = match unprefixed_name {
45-
// Extract a contigous range of bits from an unsigned integer.
45+
// Extract a contiguous range of bits from an unsigned integer.
4646
// https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_bextr_u32
4747
"bextr" => {
4848
let start = u32::try_from(right & 0xff).unwrap();

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
2424
let unprefixed_name = link_name.as_str().strip_prefix("llvm.x86.sse.").unwrap();
2525
// All these intrinsics operate on 128-bit (f32x4) SIMD vectors unless stated otherwise.
2626
// Many intrinsic names are sufixed with "ps" (packed single) or "ss" (scalar single),
27-
// where single means single precision floating point (f32). "ps" means thet the operation
27+
// where single means single precision floating point (f32). "ps" means that the operation
2828
// is performed on each element of the vector, while "ss" means that the operation is
2929
// performed only on the first element, copying the remaining elements from the input
3030
// vector (for binary operations, from the left-hand side).

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
2525

2626
// These intrinsics operate on 128-bit (f32x4, f64x2, i8x16, i16x8, i32x4, i64x2) SIMD
2727
// vectors unless stated otherwise.
28-
// Many intrinsic names are sufixed with "ps" (packed single), "ss" (scalar signle),
28+
// Many intrinsic names are sufixed with "ps" (packed single), "ss" (scalar single),
2929
// "pd" (packed double) or "sd" (scalar double), where single means single precision
3030
// floating point (f32) and double means double precision floating point (f64). "ps"
31-
// and "pd" means thet the operation is performed on each element of the vector, while
31+
// and "pd" means that the operation is performed on each element of the vector, while
3232
// "ss" and "sd" means that the operation is performed only on the first element, copying
3333
// the remaining elements from the input vector (for binary operations, from the left-hand
3434
// side).

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
107107
round_all::<rustc_apfloat::ieee::Double>(this, op, rounding, dest)?;
108108
}
109109
// Used to implement the _mm_minpos_epu16 function.
110-
// Find the minimum unsinged 16-bit integer in `op` and
110+
// Find the minimum unsigned 16-bit integer in `op` and
111111
// returns its value and position.
112112
"phminposuw" => {
113113
let [op] = this.check_shim(abi, Conv::C, link_name, args)?;

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ fn deconstruct_args<'tcx>(
213213
};
214214

215215
// The fourth letter of each string comparison intrinsic is either 'e' for "explicit" or 'i' for "implicit".
216-
// The distinction will correspond to the intrinsics type signature. In this constext, "explicit" and "implicit"
216+
// The distinction will correspond to the intrinsics type signature. In this context, "explicit" and "implicit"
217217
// refer to the way the string length is determined. The length is either passed explicitly in the "explicit"
218218
// case or determined by a null terminator in the "implicit" case.
219219
let is_explicit = match unprefixed_name.as_bytes().get(4) {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
122122
// Used to implement the _mm_sign_epi{8,16,32} functions.
123123
// Negates elements from `left` when the corresponding element in
124124
// `right` is negative. If an element from `right` is zero, zero
125-
// is writen to the corresponding output element.
125+
// is written to the corresponding output element.
126126
// Basically, we multiply `left` with `right.signum()`.
127127
"psign.b.128" | "psign.w.128" | "psign.d.128" => {
128128
let [left, right] = this.check_shim(abi, Conv::C, link_name, args)?;

src/tools/miri/tests/pass-dep/libc/libc-epoll-no-blocking.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ fn test_event_overwrite() {
417417
check_epoll_wait::<8>(epfd, &[(expected_event, expected_value)]);
418418
}
419419

420-
// An epoll notification will be provided for every succesful read in a socketpair.
420+
// An epoll notification will be provided for every successful read in a socketpair.
421421
// This behaviour differs from the real system.
422422
fn test_socketpair_read() {
423423
// Create an epoll instance.

0 commit comments

Comments
 (0)