Skip to content

Commit 9894740

Browse files
committed
Some typo fixes
1 parent 94b4fcf commit 9894740

File tree

20 files changed

+28
-28
lines changed

20 files changed

+28
-28
lines changed

src/tools/compiletest/src/common.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ pub struct Config {
381381
/// Whether to rerun tests even if the inputs are unchanged.
382382
pub force_rerun: bool,
383383

384-
/// Only rerun the tests that result has been modified accoring to Git status
384+
/// Only rerun the tests that result has been modified according to Git status
385385
pub only_modified: bool,
386386

387387
pub target_cfgs: OnceLock<TargetCfgs>,

src/tools/compiletest/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ fn is_android_gdb_target(target: &str) -> bool {
950950
)
951951
}
952952

953-
/// Returns `true` if the given target is a MSVC target for the purpouses of CDB testing.
953+
/// Returns `true` if the given target is a MSVC target for the purposes of CDB testing.
954954
fn is_pc_windows_msvc_target(target: &str) -> bool {
955955
target.ends_with("-pc-windows-msvc")
956956
}

src/tools/jsondoclint/src/validator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const LOCAL_CRATE_ID: u32 = 0;
2121
/// it is well formed. This involves calling `check_*` functions on
2222
/// fields of that item, and `add_*` functions on [`Id`]s.
2323
/// - `add_*`: These add an [`Id`] to the worklist, after validating it to check if
24-
/// the `Id` is a kind expected in this suituation.
24+
/// the `Id` is a kind expected in this situation.
2525
#[derive(Debug)]
2626
pub struct Validator<'a> {
2727
pub(crate) errs: Vec<Error>,

src/tools/lld-wrapper/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Script to invoke the bundled rust-lld with the correct flavor.
22
//!
3-
//! lld supports multiple command line interfaces. If `-flavor <flavor>` are passed as the first
3+
//! `lld` supports multiple command line interfaces. If `-flavor <flavor>` are passed as the first
44
//! two arguments the `<flavor>` command line interface is used to process the remaining arguments.
55
//! If no `-flavor` argument is present the flavor is determined by the executable name.
66
//!

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ pub fn get_target_dir(meta: &Metadata) -> PathBuf {
269269
output
270270
}
271271

272-
/// Determines where the sysroot of this exeuction is
272+
/// Determines where the sysroot of this execution is
273273
///
274274
/// Either in a user-specified spot by an envar, or in a default cache location.
275275
pub fn get_sysroot_dir() -> PathBuf {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use crate::borrow_tracker::{
99
};
1010
use crate::ProvenanceExtra;
1111

12-
/// Exactly what cache size we should use is a difficult tradeoff. There will always be some
12+
/// Exactly what cache size we should use is a difficult trade-off. There will always be some
1313
/// workload which has a `BorTag` working set which exceeds the size of the cache, and ends up
1414
/// falling back to linear searches of the borrow stack very often.
1515
/// The cost of making this value too large is that the loop in `Stack::insert` which ensures the

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ struct DisplayFmtWrapper {
390390
warning_text: S,
391391
}
392392

393-
/// Formating of the permissions on each range.
393+
/// Formatting of the permissions on each range.
394394
///
395395
/// Example:
396396
/// ```rust,ignore (private type)
@@ -422,7 +422,7 @@ struct DisplayFmtPermission {
422422
range_sep: S,
423423
}
424424

425-
/// Formating of the tree structure.
425+
/// Formatting of the tree structure.
426426
///
427427
/// Example:
428428
/// ```rust,ignore (private type)
@@ -487,7 +487,7 @@ struct DisplayFmtAccess {
487487
meh: S,
488488
}
489489

490-
/// All parameters to determine how the tree is formated.
490+
/// All parameters to determine how the tree is formatted.
491491
struct DisplayFmt {
492492
wrapper: DisplayFmtWrapper,
493493
perm: DisplayFmtPermission,

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ impl Permission {
202202
Self { inner: Frozen }
203203
}
204204

205-
/// Default initial permission of the root of a new tre at out-of-bounds positions.
205+
/// Default initial permission of the root of a new tree at out-of-bounds positions.
206206
/// Must *only* be used for the root, this is not in general an "initial" permission!
207207
pub fn new_disabled() -> Self {
208208
Self { inner: Disabled }

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ impl Tree {
704704
}
705705

706706
/// Traverses the entire tree looking for useless tags.
707-
/// Returns true iff the tag it was called on is still live or has live children,
707+
/// Returns true if the tag it was called on is still live or has live children,
708708
/// and removes from the tree all tags that have no live children.
709709
///
710710
/// NOTE: This leaves in the middle of the tree tags that are unreachable but have

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ mod spurious_read {
483483
/// that causes UB in the target but not in the source.
484484
/// This implementation simply explores the reachable space
485485
/// by all sequences of `TestEvent`.
486-
/// This function can be instanciated with `RetX` and `RetY`
486+
/// This function can be instantiated with `RetX` and `RetY`
487487
/// among `NoRet` or `AllowRet` to resp. forbid/allow `x`/`y` to lose their
488488
/// protector.
489489
fn distinguishable<RetX, RetY>(&self, other: &Self) -> bool

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ pub enum BlockReason {
111111
Condvar(CondvarId),
112112
/// Blocked on a reader-writer lock.
113113
RwLock(RwLockId),
114-
/// Blocled on a Futex variable.
114+
/// Blocked on a Futex variable.
115115
Futex { addr: u64 },
116116
/// Blocked on an InitOnce.
117117
InitOnce(InitOnceId),

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
//! One consequence of this difference is that safe/sound Rust allows for more operations on atomic locations
4949
//! than the C++20 atomic API was intended to allow, such as non-atomically accessing
5050
//! a previously atomically accessed location, or accessing previously atomically accessed locations with a differently sized operation
51-
//! (such as accessing the top 16 bits of an AtomicU32). These scenarios are generally undiscussed in formalisations of C++ memory model.
51+
//! (such as accessing the top 16 bits of an AtomicU32). These scenarios are generally undiscussed in formalizations of C++ memory model.
5252
//! In Rust, these operations can only be done through a `&mut AtomicFoo` reference or one derived from it, therefore these operations
5353
//! can only happen after all previous accesses on the same locations. This implementation is adapted to allow these operations.
5454
//! A mixed atomicity read that races with writes, or a write that races with reads or writes will still cause UBs to be thrown.

src/tools/miri/src/eval.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub enum IsolatedOp {
6161
/// Reject an op requiring communication with the host. By
6262
/// default, miri rejects the op with an abort. If not, it returns
6363
/// an error code, and prints a warning about it. Warning levels
64-
/// are controlled by `RejectOpWith` enum.
64+
/// are controlled by `RejectOpWith` en um.
6565
Reject(RejectOpWith),
6666

6767
/// Execute op requiring communication with the host, i.e. disable isolation.

src/tools/miri/src/machine.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,11 @@ pub enum Provenance {
206206
/// whether *some* exposed pointer could have done what we want to do, and if the answer is yes
207207
/// then we allow the access. This allows too much code in two ways:
208208
/// - The same wildcard pointer can "take the role" of multiple different exposed pointers on
209-
/// subsequenct memory accesses.
209+
/// subsequent memory accesses.
210210
/// - In the aliasing model, we don't just have to know the borrow tag of the pointer used for
211211
/// the access, we also have to update the aliasing state -- and that update can be very
212212
/// different depending on which borrow tag we pick! Stacked Borrows has support for this by
213-
/// switching to a stack that is only approximately known, i.e. we overapproximate the effect
213+
/// switching to a stack that is only approximately known, i.e. we over-approximate the effect
214214
/// of using *any* exposed pointer for this access, and only keep information about the borrow
215215
/// stack that would be true with all possible choices.
216216
Wildcard,

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//! calls to munmap, but for a very different reason. In principle, according to the man pages, it
1212
//! is possible to unmap arbitrary regions of address space. But in a high-level language like Rust
1313
//! this amounts to partial deallocation, which LLVM does not support. So any attempt to call our
14-
//! munmap shim which would partily unmap a region of address space previously mapped by mmap will
14+
//! munmap shim which would partially unmap a region of address space previously mapped by mmap will
1515
//! report UB.
1616
1717
use crate::*;

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ fn reacquire_cond_mutex<'mir, 'tcx: 'mir>(
390390
Ok(())
391391
}
392392

393-
/// After a thread waiting on a condvar was signalled:
393+
/// After a thread waiting on a condvar was signaled:
394394
/// Reacquire the conditional variable and remove the timeout callback if any
395395
/// was registered.
396396
fn post_cond_signal<'mir, 'tcx: 'mir>(

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ fn int_abs<'tcx>(
757757
Ok(())
758758
}
759759

760-
/// Splits `op` (which must be a SIMD vector) into 128-bit chuncks.
760+
/// Splits `op` (which must be a SIMD vector) into 128-bit chunks.
761761
///
762762
/// Returns a tuple where:
763763
/// * The first element is the number of 128-bit chunks (let's call it `N`).
@@ -788,7 +788,7 @@ fn split_simd_to_128bit_chunks<'tcx, P: Projectable<'tcx, Provenance>>(
788788
Ok((num_chunks, items_per_chunk, chunked_op))
789789
}
790790

791-
/// Horizontaly performs `which` operation on adjacent values of
791+
/// Horizontally performs `which` operation on adjacent values of
792792
/// `left` and `right` SIMD vectors and stores the result in `dest`.
793793
/// "Horizontal" means that the i-th output element is calculated
794794
/// from the elements 2*i and 2*i+1 of the concatenation of `left` and
@@ -1256,7 +1256,7 @@ fn packusdw<'tcx>(
12561256

12571257
/// Negates elements from `left` when the corresponding element in
12581258
/// `right` is negative. If an element from `right` is zero, zero
1259-
/// is writen to the corresponding output element.
1259+
/// is written to the corresponding output element.
12601260
/// In other words, multiplies `left` with `right.signum()`.
12611261
fn psign<'tcx>(
12621262
this: &mut crate::MiriInterpCx<'_, 'tcx>,

src/tools/rustfmt/src/comment.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1263,15 +1263,15 @@ pub(crate) enum FullCodeCharKind {
12631263
InComment,
12641264
/// Last character of a comment, '\n' for a line comment, '/' for a block comment.
12651265
EndComment,
1266-
/// Start of a mutlitine string inside a comment
1266+
/// Start of a multiline string inside a comment
12671267
StartStringCommented,
1268-
/// End of a mutlitine string inside a comment
1268+
/// End of a multiline string inside a comment
12691269
EndStringCommented,
12701270
/// Inside a commented string
12711271
InStringCommented,
1272-
/// Start of a mutlitine string
1272+
/// Start of a multiline string
12731273
StartString,
1274-
/// End of a mutlitine string
1274+
/// End of a multiline string
12751275
EndString,
12761276
/// Inside a string.
12771277
InString,

src/tools/rustfmt/src/config/options.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ pub trait CliOptions {
416416
fn config_path(&self) -> Option<&Path>;
417417
}
418418

419-
/// The edition of the syntax and semntics of code (RFC 2052).
419+
/// The edition of the syntax and semantics of code (RFC 2052).
420420
#[config_type]
421421
pub enum Edition {
422422
#[value = "2015"]

src/tools/rustfmt/src/parse/session.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ impl ParseSess {
164164
///
165165
/// * `id` - The name of the module
166166
/// * `relative` - If Some(symbol), the symbol name is a directory relative to the dir_path.
167-
/// If relative is Some, resolve the submodle at {dir_path}/{symbol}/{id}.rs
167+
/// If relative is Some, resolve the submodule at {dir_path}/{symbol}/{id}.rs
168168
/// or {dir_path}/{symbol}/{id}/mod.rs. if None, resolve the module at {dir_path}/{id}.rs.
169169
/// * `dir_path` - Module resolution will occur relative to this directory.
170170
pub(crate) fn default_submod_path(

0 commit comments

Comments
 (0)