Skip to content

Commit

Permalink
Auto merge of rust-lang#3452 - findseat:master, r=saethlin
Browse files Browse the repository at this point in the history
chore: fix some typos
  • Loading branch information
bors committed Apr 6, 2024
2 parents cda7898 + 8f68946 commit 81cab97
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/tools/miri/src/borrow_tracker/tree_borrows/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl AccessCause {
/// Complete data for an event:
#[derive(Clone, Debug)]
pub struct Event {
/// Transformation of permissions that occured because of this event.
/// Transformation of permissions that occurred because of this event.
pub transition: PermTransition,
/// Kind of the access that triggered this event.
pub access_cause: AccessCause,
Expand All @@ -58,7 +58,7 @@ pub struct Event {
/// `None` means that this is an implicit access to the entire allocation
/// (used for the implicit read on protector release).
pub access_range: Option<AllocRange>,
/// The transition recorded by this event only occured on a subrange of
/// The transition recorded by this event only occurred on a subrange of
/// `access_range`: a single access on `access_range` triggers several events,
/// each with their own mutually disjoint `transition_range`. No-op transitions
/// should not be recorded as events, so the union of all `transition_range` is not
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ impl Tree {
let rperms = {
let mut perms = UniValMap::default();
// We manually set it to `Active` on all in-bounds positions.
// We also ensure that it is initalized, so that no `Active` but
// We also ensure that it is initialized, so that no `Active` but
// not yet initialized nodes exist. Essentially, we pretend there
// was a write that initialized these to `Active`.
perms.insert(root_idx, LocationState::new_init(Permission::new_active()));
Expand Down
6 changes: 3 additions & 3 deletions src/tools/miri/src/borrow_tracker/tree_borrows/tree/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ fn protected_enforces_noalias() {
}
}

/// We are going to exhaustively test the possibily of inserting
/// We are going to exhaustively test the possibility of inserting
/// a spurious read in some code.
///
/// We choose some pointer `x` through which we want a spurious read to be inserted.
Expand Down Expand Up @@ -270,7 +270,7 @@ mod spurious_read {
match self {
TestEvent::Access(acc) => write!(f, "{acc}"),
// The fields of the `Ret` variants just serve to make them
// impossible to instanciate via the `RetX = NoRet` type; we can
// impossible to instantiate via the `RetX = NoRet` type; we can
// always ignore their value.
TestEvent::RetX(_) => write!(f, "ret x"),
TestEvent::RetY(_) => write!(f, "ret y"),
Expand Down Expand Up @@ -395,7 +395,7 @@ mod spurious_read {
match evt {
TestEvent::Access(acc) => self.perform_test_access(acc),
// The fields of the `Ret` variants just serve to make them
// impossible to instanciate via the `RetX = NoRet` type; we can
// impossible to instantiate via the `RetX = NoRet` type; we can
// always ignore their value.
TestEvent::RetX(_) => self.end_protector_x(),
TestEvent::RetY(_) => self.end_protector_y(),
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/tests/fail/tree_borrows/spurious_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ fn retagx_retagy_retx_writey_rety() {
// - retag `y` protected
// - (wait for the other thread to return so that there is no foreign protector when we write)
// - attempt a write through `y`.
// - (UB should have occured by now, but the next step would be to
// - (UB should have occurred by now, but the next step would be to
// remove `y`'s protector)
let thread_y = thread::spawn(move || {
let b = (2, by);
Expand Down

0 comments on commit 81cab97

Please sign in to comment.