Skip to content

Commit ef1f9a7

Browse files
authored
Merge pull request #3 from oli-obk/sync
Sync with miri
2 parents 4306a9b + 2f0a535 commit ef1f9a7

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"editor.formatOnSave": true
3+
}

src/lib.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
#![allow(clippy::enum_variant_names, clippy::useless_format, clippy::too_many_arguments)]
1+
#![allow(
2+
clippy::enum_variant_names,
3+
clippy::useless_format,
4+
clippy::too_many_arguments,
5+
rustc::internal
6+
)]
27

38
use std::collections::VecDeque;
49
use std::ffi::OsString;
@@ -194,9 +199,9 @@ pub fn run_tests(mut config: Config) -> Result<()> {
194199
run_test(&path, &config, &target, &revision, &comments);
195200

196201
// Using a single `eprintln!` to prevent messages from threads from getting intermingled.
197-
let mut msg = format!("{} ", path.display());
202+
let mut msg = format!("{}", path.display());
198203
if !revision.is_empty() {
199-
write!(msg, "(revision `{revision}`) ").unwrap();
204+
write!(msg, " (revision `{revision}`) ").unwrap();
200205
}
201206
if errors.is_empty() {
202207
finished_files_sender.send((msg, TestResult::Ok))?;
@@ -267,7 +272,7 @@ pub fn run_tests(mut config: Config) -> Result<()> {
267272
}
268273
Error::ErrorsWithoutPattern { path: None, msgs } => {
269274
eprintln!(
270-
"There were {} unmatched diagnostics that occurred outside the testfile and had not pattern",
275+
"There were {} unmatched diagnostics that occurred outside the testfile and had no pattern",
271276
msgs.len(),
272277
);
273278
for Message { level, message } in msgs {
@@ -624,8 +629,8 @@ pub enum Mode {
624629

625630
impl Mode {
626631
fn ok(self, status: ExitStatus) -> Errors {
627-
match (status.code().unwrap(), self) {
628-
(1, Mode::Fail) | (101, Mode::Panic) | (0, Mode::Pass) => vec![],
632+
match (status.code(), self) {
633+
(Some(1), Mode::Fail) | (Some(101), Mode::Panic) | (Some(0), Mode::Pass) => vec![],
629634
_ => vec![Error::ExitStatus(self, status)],
630635
}
631636
}

0 commit comments

Comments
 (0)