Skip to content

Commit 81f85ec

Browse files
committed
Fix typos (taking into account review comments)
1 parent 725a786 commit 81f85ec

File tree

12 files changed

+18
-18
lines changed

12 files changed

+18
-18
lines changed

cargo-miri/src/util.rs

Lines changed: 1 addition & 1 deletion
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 {

miri-script/src/commands.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ impl Command {
255255
cmd!(sh, "git fetch http://localhost:{JOSH_PORT}/rust-lang/rust.git@{commit}{JOSH_FILTER}.git")
256256
.run()
257257
.map_err(|e| {
258-
// Try to un-do the previous `git commit`, to leave the repo in the state we found it it.
258+
// Try to un-do the previous `git commit`, to leave the repo in the state we found it.
259259
cmd!(sh, "git reset --hard HEAD^")
260260
.run()
261261
.expect("FAILED to clean up again after failed `git fetch`, sorry for that");

src/borrow_tracker/stacked_borrows/stack.rs

Lines changed: 1 addition & 1 deletion
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/borrow_tracker/tree_borrows/diagnostics.rs

Lines changed: 3 additions & 3 deletions
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/borrow_tracker/tree_borrows/perms.rs

Lines changed: 1 addition & 1 deletion
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/borrow_tracker/tree_borrows/tree/tests.rs

Lines changed: 1 addition & 1 deletion
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/concurrency/thread.rs

Lines changed: 1 addition & 1 deletion
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/concurrency/weak_memory.rs

Lines changed: 1 addition & 1 deletion
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/machine.rs

Lines changed: 2 additions & 2 deletions
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/shims/unix/mem.rs

Lines changed: 2 additions & 2 deletions
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::*;
@@ -78,7 +78,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
7878
// * The implementation does not support the combination of accesses requested in the
7979
// prot argument.
8080
//
81-
// Miri doesn't support MAP_FIXED or any any protections other than PROT_READ|PROT_WRITE.
81+
// Miri doesn't support MAP_FIXED or any protections other than PROT_READ|PROT_WRITE.
8282
if flags & map_fixed != 0 || prot != prot_read | prot_write {
8383
this.set_last_error(this.eval_libc("ENOTSUP"))?;
8484
return Ok(this.eval_libc("MAP_FAILED"));

0 commit comments

Comments
 (0)