Skip to content

Commit e6e8773

Browse files
committed
start messages in lower-case
1 parent 1103a10 commit e6e8773

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
@@ -359,7 +359,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
359359
fn check_no_isolation(&self, name: &str) -> InterpResult<'tcx> {
360360
if !self.eval_context_ref().machine.communicate {
361361
throw_unsup_format!(
362-
"`{}` not available when isolation is enabled. Pass the flag `-Zmiri-disable-isolation` to disable it.",
362+
"`{}` not available when isolation is enabled (pass the flag `-Zmiri-disable-isolation` to disable isolation)",
363363
name,
364364
)
365365
}
@@ -415,13 +415,13 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
415415
AlreadyExists => "EEXIST",
416416
WouldBlock => "EWOULDBLOCK",
417417
_ => {
418-
throw_unsup_format!("The {} error cannot be transformed into a raw os error", e)
418+
throw_unsup_format!("io error {} cannot be transformed into a raw os error", e)
419419
}
420420
})?
421421
} else {
422422
// FIXME: we have to implement the Windows equivalent of this.
423423
throw_unsup_format!(
424-
"Setting the last OS error from an io::Error is unsupported for {}.",
424+
"setting the last OS error from an io::Error is unsupported for {}.",
425425
target.target_os
426426
)
427427
};

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
@@ -436,7 +436,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
436436
_ => match this.tcx.sess.target.target.target_os.as_str() {
437437
"linux" | "macos" => return posix::EvalContextExt::emulate_foreign_item_by_name(this, link_name, args, dest, ret),
438438
"windows" => return windows::EvalContextExt::emulate_foreign_item_by_name(this, link_name, args, dest, ret),
439-
target => throw_unsup_format!("The {} target platform is not supported", target),
439+
target => throw_unsup_format!("the {} target platform is not supported", target),
440440
}
441441
};
442442

src/shims/foreign_items/posix.rs

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

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)