|
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 | +)] |
2 | 7 |
|
3 | 8 | use std::collections::VecDeque;
|
4 | 9 | use std::ffi::OsString;
|
@@ -194,9 +199,9 @@ pub fn run_tests(mut config: Config) -> Result<()> {
|
194 | 199 | run_test(&path, &config, &target, &revision, &comments);
|
195 | 200 |
|
196 | 201 | // 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()); |
198 | 203 | if !revision.is_empty() {
|
199 |
| - write!(msg, "(revision `{revision}`) ").unwrap(); |
| 204 | + write!(msg, " (revision `{revision}`) ").unwrap(); |
200 | 205 | }
|
201 | 206 | if errors.is_empty() {
|
202 | 207 | finished_files_sender.send((msg, TestResult::Ok))?;
|
@@ -267,7 +272,7 @@ pub fn run_tests(mut config: Config) -> Result<()> {
|
267 | 272 | }
|
268 | 273 | Error::ErrorsWithoutPattern { path: None, msgs } => {
|
269 | 274 | 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", |
271 | 276 | msgs.len(),
|
272 | 277 | );
|
273 | 278 | for Message { level, message } in msgs {
|
@@ -624,8 +629,8 @@ pub enum Mode {
|
624 | 629 |
|
625 | 630 | impl Mode {
|
626 | 631 | 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![], |
629 | 634 | _ => vec![Error::ExitStatus(self, status)],
|
630 | 635 | }
|
631 | 636 | }
|
|
0 commit comments