Skip to content

Commit 6cbb540

Browse files
committed
Merge from rustc
2 parents 83b0574 + 1bcefb9 commit 6cbb540

File tree

17 files changed

+37
-20
lines changed

17 files changed

+37
-20
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");

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/intrinsics/simd.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
4242
| "flog2"
4343
| "flog10"
4444
| "ctlz"
45+
| "ctpop"
4546
| "cttz"
4647
| "bswap"
4748
| "bitreverse"
@@ -68,6 +69,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
6869
"round" => Op::Round(rustc_apfloat::Round::NearestTiesToAway),
6970
"trunc" => Op::Round(rustc_apfloat::Round::TowardZero),
7071
"ctlz" => Op::Numeric(sym::ctlz),
72+
"ctpop" => Op::Numeric(sym::ctpop),
7173
"cttz" => Op::Numeric(sym::cttz),
7274
"bswap" => Op::Numeric(sym::bswap),
7375
"bitreverse" => Op::Numeric(sym::bitreverse),

src/machine.rs

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

0 commit comments

Comments
 (0)