Skip to content

Commit 25d6cd1

Browse files
committed
Auto merge of #3623 - RalfJung:rustup, r=RalfJung
Rustup
2 parents 53481c4 + a1aed15 commit 25d6cd1

File tree

19 files changed

+48
-29
lines changed

19 files changed

+48
-29
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
@@ -253,7 +253,7 @@ impl Command {
253253
cmd!(sh, "git fetch http://localhost:{JOSH_PORT}/rust-lang/rust.git@{commit}{JOSH_FILTER}.git")
254254
.run()
255255
.map_err(|e| {
256-
// Try to un-do the previous `git commit`, to leave the repo in the state we found it it.
256+
// Try to un-do the previous `git commit`, to leave the repo in the state we found it.
257257
cmd!(sh, "git reset --hard HEAD^")
258258
.run()
259259
.expect("FAILED to clean up again after failed `git fetch`, sorry for that");

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6579ed89f0fcc26da71afdd11d30d63f6f812a0a
1+
b54dd08a84f3c07efbc2aaf63c3df219ae680a03

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: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ enum PermissionPriv {
1717
/// is relevant
1818
/// - `conflicted` is set on foreign reads,
1919
/// - `conflicted` must not be set on child writes (there is UB otherwise).
20+
///
2021
/// This is so that the behavior of `Reserved` adheres to the rules of `noalias`:
2122
/// - foreign-read then child-write is UB due to `conflicted`,
2223
/// - child-write then foreign-read is UB since child-write will activate and then
@@ -202,7 +203,7 @@ impl Permission {
202203
Self { inner: Frozen }
203204
}
204205

205-
/// Default initial permission of the root of a new tre at out-of-bounds positions.
206+
/// Default initial permission of the root of a new tree at out-of-bounds positions.
206207
/// Must *only* be used for the root, this is not in general an "initial" permission!
207208
pub fn new_disabled() -> Self {
208209
Self { inner: Disabled }
@@ -339,15 +340,15 @@ pub mod diagnostics {
339340
/// This function assumes that its arguments apply to the same location
340341
/// and that they were obtained during a normal execution. It will panic otherwise.
341342
/// - all transitions involved in `self` and `err` should be increasing
342-
/// (Reserved < Active < Frozen < Disabled);
343+
/// (Reserved < Active < Frozen < Disabled);
343344
/// - between `self` and `err` the permission should also be increasing,
344-
/// so all permissions inside `err` should be greater than `self.1`;
345+
/// so all permissions inside `err` should be greater than `self.1`;
345346
/// - `Active` and `Reserved(conflicted=false)` cannot cause an error
346-
/// due to insufficient permissions, so `err` cannot be a `ChildAccessForbidden(_)`
347-
/// of either of them;
347+
/// due to insufficient permissions, so `err` cannot be a `ChildAccessForbidden(_)`
348+
/// of either of them;
348349
/// - `err` should not be `ProtectedDisabled(Disabled)`, because the protected
349-
/// tag should not have been `Disabled` in the first place (if this occurs it means
350-
/// we have unprotected tags that become protected)
350+
/// tag should not have been `Disabled` in the first place (if this occurs it means
351+
/// we have unprotected tags that become protected)
351352
pub(in super::super) fn is_relevant(&self, err: TransitionError) -> bool {
352353
// NOTE: `super::super` is the visibility of `TransitionError`
353354
assert!(self.is_possible());

src/borrow_tracker/tree_borrows/tree/tests.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ mod spurious_read {
230230
/// - any access to the same location
231231
/// - end of one of them being protected
232232
/// - a retag that would change their relative position
233+
///
233234
/// The type `TestEvent` models these kinds of events.
234235
///
235236
/// In order to prevent `x` or `y` from losing their protector,
@@ -483,7 +484,7 @@ mod spurious_read {
483484
/// that causes UB in the target but not in the source.
484485
/// This implementation simply explores the reachable space
485486
/// by all sequences of `TestEvent`.
486-
/// This function can be instanciated with `RetX` and `RetY`
487+
/// This function can be instantiated with `RetX` and `RetY`
487488
/// among `NoRet` or `AllowRet` to resp. forbid/allow `x`/`y` to lose their
488489
/// protector.
489490
fn distinguishable<RetX, RetY>(&self, other: &Self) -> bool

src/concurrency/data_race.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,9 +1106,9 @@ trait EvalContextPrivExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
11061106
/// Temporarily allow data-races to occur. This should only be used in
11071107
/// one of these cases:
11081108
/// - One of the appropriate `validate_atomic` functions will be called to
1109-
/// to treat a memory access as atomic.
1109+
/// treat a memory access as atomic.
11101110
/// - The memory being accessed should be treated as internal state, that
1111-
/// cannot be accessed by the interpreted program.
1111+
/// cannot be accessed by the interpreted program.
11121112
/// - Execution of the interpreted program execution has halted.
11131113
#[inline]
11141114
fn allow_data_races_ref<R>(&self, op: impl FnOnce(&MiriInterpCx<'mir, 'tcx>) -> R) -> R {

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.

0 commit comments

Comments
 (0)