Skip to content

Commit e6c2385

Browse files
committed
start messages in lower-case
1 parent 6fecfd9 commit e6c2385

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

src/helpers.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
358358
fn check_no_isolation(&self, name: &str) -> InterpResult<'tcx> {
359359
if !self.eval_context_ref().machine.communicate {
360360
throw_unsup_format!(
361-
"`{}` not available when isolation is enabled. Pass the flag `-Zmiri-disable-isolation` to disable it.",
361+
"`{}` not available when isolation is enabled (pass the flag `-Zmiri-disable-isolation` to disable isolation)",
362362
name,
363363
)
364364
}
@@ -414,13 +414,13 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
414414
AlreadyExists => "EEXIST",
415415
WouldBlock => "EWOULDBLOCK",
416416
_ => {
417-
throw_unsup_format!("The {} error cannot be transformed into a raw os error", e)
417+
throw_unsup_format!("io error {} cannot be transformed into a raw os error", e)
418418
}
419419
})?
420420
} else {
421421
// FIXME: we have to implement the Windows equivalent of this.
422422
throw_unsup_format!(
423-
"Setting the last OS error from an io::Error is unsupported for {}.",
423+
"setting the last OS error from an io::Error is unsupported for {}.",
424424
target.target_os
425425
)
426426
};

src/shims/dlsym.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ impl Dlsym {
1515
Ok(match name {
1616
"getentropy" => Some(GetEntropy),
1717
"__pthread_get_minstack" => None,
18-
_ => throw_unsup_format!("Unsupported dlsym: {}", name),
18+
_ => throw_unsup_format!("unsupported dlsym: {}", name),
1919
})
2020
}
2121
}

src/shims/foreign_items.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
439439
_ => match this.tcx.sess.target.target.target_os.as_str() {
440440
"linux" | "macos" => return posix::EvalContextExt::emulate_foreign_item_by_name(this, link_name, args, dest, ret),
441441
"windows" => return windows::EvalContextExt::emulate_foreign_item_by_name(this, link_name, args, dest, ret),
442-
target => throw_unsup_format!("The {} target platform is not supported", target),
442+
target => throw_unsup_format!("the {} target platform is not supported", target),
443443
}
444444
};
445445

src/shims/foreign_items/posix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
308308
if let Some(result) = result {
309309
this.write_scalar(result, dest)?;
310310
} else {
311-
throw_unsup_format!("Unimplemented sysconf name: {}", name)
311+
throw_unsup_format!("unimplemented sysconf name: {}", name)
312312
}
313313
}
314314

src/shims/fs.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ trait EvalContextExtPrivate<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, '
198198
}
199199
Err(e) => return match e.raw_os_error() {
200200
Some(error) => Ok(error),
201-
None => throw_unsup_format!("The error {} couldn't be converted to a return value", e),
201+
None => throw_unsup_format!("the error {} couldn't be converted to a return value", e),
202202
}
203203
}
204204
}
@@ -261,7 +261,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
261261
// windows. We need to check that in fact the access mode flags for the current platform
262262
// only use these two bits, otherwise we are in an unsupported platform and should error.
263263
if (o_rdonly | o_wronly | o_rdwr) & !0b11 != 0 {
264-
throw_unsup_format!("Access mode flags on this platform are unsupported");
264+
throw_unsup_format!("access mode flags on this platform are unsupported");
265265
}
266266
let mut writable = true;
267267

@@ -276,7 +276,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
276276
} else if access_mode == o_rdwr {
277277
options.read(true).write(true);
278278
} else {
279-
throw_unsup_format!("Unsupported access mode {:#x}", access_mode);
279+
throw_unsup_format!("unsupported access mode {:#x}", access_mode);
280280
}
281281
// We need to check that there aren't unsupported options in `flag`. For this we try to
282282
// reproduce the content of `flag` in the `mirror` variable using only the supported
@@ -351,7 +351,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
351351
// differ in whether the FD_CLOEXEC flag is pre-set on the new file descriptor,
352352
// thus they can share the same implementation here.
353353
if fd < MIN_NORMAL_FILE_FD {
354-
throw_unsup_format!("Duplicating file descriptors for stdin, stdout, or stderr is not supported")
354+
throw_unsup_format!("duplicating file descriptors for stdin, stdout, or stderr is not supported")
355355
}
356356
let start_op = start_op.ok_or_else(|| {
357357
err_unsup_format!(
@@ -369,7 +369,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
369369
});
370370
this.try_unwrap_io_result(fd_result)
371371
} else {
372-
throw_unsup_format!("The {:#x} command is not supported for `fcntl`)", cmd);
372+
throw_unsup_format!("the {:#x} command is not supported for `fcntl`)", cmd);
373373
}
374374
}
375375

@@ -913,7 +913,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
913913
name_place.layout.size.bytes(),
914914
)?;
915915
if !name_fits {
916-
throw_unsup_format!("A directory entry had a name too large to fit in libc::dirent64");
916+
throw_unsup_format!("a directory entry had a name too large to fit in libc::dirent64");
917917
}
918918

919919
let entry_place = this.deref_operand(entry_op)?;
@@ -953,7 +953,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
953953
// return positive error number on error
954954
Some(error) => Ok(error),
955955
None => {
956-
throw_unsup_format!("The error {} couldn't be converted to a return value", e)
956+
throw_unsup_format!("the error {} couldn't be converted to a return value", e)
957957
}
958958
},
959959
}
@@ -1001,7 +1001,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
10011001
name_place.layout.size.bytes(),
10021002
)?;
10031003
if !name_fits {
1004-
throw_unsup_format!("A directory entry had a name too large to fit in libc::dirent");
1004+
throw_unsup_format!("a directory entry had a name too large to fit in libc::dirent");
10051005
}
10061006

10071007
let entry_place = this.deref_operand(entry_op)?;
@@ -1042,7 +1042,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
10421042
// return positive error number on error
10431043
Some(error) => Ok(error),
10441044
None => {
1045-
throw_unsup_format!("The error {} couldn't be converted to a return value", e)
1045+
throw_unsup_format!("the error {} couldn't be converted to a return value", e)
10461046
}
10471047
},
10481048
}

0 commit comments

Comments
 (0)