_ => {
option_env!("RUST_SYSROOT")
.expect(
- "could not find sysroot. either set `MIRI_SYSROOT` at run-time, or at \
+ "could not find sysroot. Either set `MIRI_SYSROOT` at run-time, or at \
build-time specify `RUST_SYSROOT` env var or use rustup or multirust",
)
.to_owned()
pub use crate::intrinsic::EvalContextExt as IntrinsicEvalContextExt;
pub use crate::tls::{EvalContextExt as TlsEvalContextExt, TlsData};
use crate::range_map::RangeMap;
-// FIXME: rustc bug, issue <https://github.com/rust-lang/rust/issues/53682>.
-#[allow(unused_imports)]
+#[allow(unused_imports)] // FIXME: rustc bug, issue <https://github.com/rust-lang/rust/issues/53682>.
pub use crate::helpers::{EvalContextExt as HelpersEvalContextExt};
use crate::mono_hash_map::MonoHashMap;
pub use crate::stacked_borrows::{EvalContextExt as StackedBorEvalContextExt};
let dest = ecx.eval_place(&mir::Place::Local(args.next().unwrap()))?;
let argc = Scalar::from_uint(config.args.len() as u128, dest.layout.size);
ecx.write_scalar(argc, dest)?;
- // Store argc for macOS: `_NSGetArgc`.
+ // Store argc for macOS's `_NSGetArgc`.
{
let argc_place = ecx.allocate(dest.layout, MiriMemoryKind::Env.into());
ecx.write_scalar(argc, argc_place.into())?;
#[derive(Clone, Debug)]
struct Elem<T> {
- /// The range covered by this element, never empty.
+ /// The range covered by this element; never empty.
range: ops::Range<u64>,
+ /// The data stored for this element.
data: T,
}
#[derive(Clone, Debug)]
let candidate = left.checked_add(right).unwrap() / 2;
let elem = &self.v[candidate];
if offset < elem.range.start {
- // we are too far right (offset is further left)
+ // We are too far right (offset is further left).
debug_assert!(candidate < right); // we are making progress
right = candidate;
} else if offset >= elem.range.end {
- // we are too far left (offset is further right)
+ // We are too far left (offset is further right).
debug_assert!(candidate >= left); // we are making progress
left = candidate+1;
} else {