Skip to content

Commit 81cab97

Browse files
committed
Auto merge of #3452 - findseat:master, r=saethlin
chore: fix some typos
2 parents cda7898 + 8f68946 commit 81cab97

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl AccessCause {
4848
/// Complete data for an event:
4949
#[derive(Clone, Debug)]
5050
pub struct Event {
51-
/// Transformation of permissions that occured because of this event.
51+
/// Transformation of permissions that occurred because of this event.
5252
pub transition: PermTransition,
5353
/// Kind of the access that triggered this event.
5454
pub access_cause: AccessCause,
@@ -58,7 +58,7 @@ pub struct Event {
5858
/// `None` means that this is an implicit access to the entire allocation
5959
/// (used for the implicit read on protector release).
6060
pub access_range: Option<AllocRange>,
61-
/// The transition recorded by this event only occured on a subrange of
61+
/// The transition recorded by this event only occurred on a subrange of
6262
/// `access_range`: a single access on `access_range` triggers several events,
6363
/// each with their own mutually disjoint `transition_range`. No-op transitions
6464
/// should not be recorded as events, so the union of all `transition_range` is not

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ impl Tree {
473473
let rperms = {
474474
let mut perms = UniValMap::default();
475475
// We manually set it to `Active` on all in-bounds positions.
476-
// We also ensure that it is initalized, so that no `Active` but
476+
// We also ensure that it is initialized, so that no `Active` but
477477
// not yet initialized nodes exist. Essentially, we pretend there
478478
// was a write that initialized these to `Active`.
479479
perms.insert(root_idx, LocationState::new_init(Permission::new_active()));

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ fn protected_enforces_noalias() {
7575
}
7676
}
7777

78-
/// We are going to exhaustively test the possibily of inserting
78+
/// We are going to exhaustively test the possibility of inserting
7979
/// a spurious read in some code.
8080
///
8181
/// We choose some pointer `x` through which we want a spurious read to be inserted.
@@ -270,7 +270,7 @@ mod spurious_read {
270270
match self {
271271
TestEvent::Access(acc) => write!(f, "{acc}"),
272272
// The fields of the `Ret` variants just serve to make them
273-
// impossible to instanciate via the `RetX = NoRet` type; we can
273+
// impossible to instantiate via the `RetX = NoRet` type; we can
274274
// always ignore their value.
275275
TestEvent::RetX(_) => write!(f, "ret x"),
276276
TestEvent::RetY(_) => write!(f, "ret y"),
@@ -395,7 +395,7 @@ mod spurious_read {
395395
match evt {
396396
TestEvent::Access(acc) => self.perform_test_access(acc),
397397
// The fields of the `Ret` variants just serve to make them
398-
// impossible to instanciate via the `RetX = NoRet` type; we can
398+
// impossible to instantiate via the `RetX = NoRet` type; we can
399399
// always ignore their value.
400400
TestEvent::RetX(_) => self.end_protector_x(),
401401
TestEvent::RetY(_) => self.end_protector_y(),

src/tools/miri/tests/fail/tree_borrows/spurious_read.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ fn retagx_retagy_retx_writey_rety() {
8989
// - retag `y` protected
9090
// - (wait for the other thread to return so that there is no foreign protector when we write)
9191
// - attempt a write through `y`.
92-
// - (UB should have occured by now, but the next step would be to
92+
// - (UB should have occurred by now, but the next step would be to
9393
// remove `y`'s protector)
9494
let thread_y = thread::spawn(move || {
9595
let b = (2, by);

0 commit comments

Comments
 (0)