From d8649716e56d14c85cda16f756342aa36f5e6211 Mon Sep 17 00:00:00 2001 From: bors Date: Sat, 6 Feb 2021 19:12:01 +0000 Subject: [PATCH] Auto merge of #9148 - bjorn3:fix_ci, r=ehuss Fix warnings of the new non_fmt_panic lint This fixes the CI failure since the latest nightly. See https://github.com/rust-lang/rust/pull/81645 --- crates/cargo-test-support/src/cross_compile.rs | 2 +- tests/testsuite/cargo_command.rs | 2 +- tests/testsuite/new.rs | 14 +++++++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/crates/cargo-test-support/src/cross_compile.rs b/crates/cargo-test-support/src/cross_compile.rs index 7d3ec3353..ff272d482 100644 --- a/crates/cargo-test-support/src/cross_compile.rs +++ b/crates/cargo-test-support/src/cross_compile.rs @@ -177,7 +177,7 @@ rustup does not appear to be installed. Make sure that the appropriate }, } - panic!(message); + panic!("{}", message); } /// The alternate target-triple to build with. diff --git a/tests/testsuite/cargo_command.rs b/tests/testsuite/cargo_command.rs index 75eec676d..04e3051c7 100644 --- a/tests/testsuite/cargo_command.rs +++ b/tests/testsuite/cargo_command.rs @@ -365,5 +365,5 @@ fn closed_output_ok() { .unwrap(); let status = child.wait().unwrap(); assert!(status.success()); - assert!(s.is_empty(), s); + assert!(s.is_empty(), "{}", s); } diff --git a/tests/testsuite/new.rs b/tests/testsuite/new.rs index 548810bce..9a7f71cf1 100644 --- a/tests/testsuite/new.rs +++ b/tests/testsuite/new.rs @@ -370,7 +370,11 @@ fn finds_git_author() { let toml = paths::root().join("foo/Cargo.toml"); let contents = fs::read_to_string(&toml).unwrap(); - assert!(contents.contains(r#"authors = ["foo "]"#), contents); + assert!( + contents.contains(r#"authors = ["foo "]"#), + "{}", + contents + ); } #[cargo_test] @@ -411,7 +415,11 @@ fn finds_git_author_in_included_config() { cargo_process("new foo/bar").run(); let toml = paths::root().join("foo/bar/Cargo.toml"); let contents = fs::read_to_string(&toml).unwrap(); - assert!(contents.contains(r#"authors = ["foo "]"#), contents,); + assert!( + contents.contains(r#"authors = ["foo "]"#), + "{}", + contents + ); } #[cargo_test] @@ -632,7 +640,7 @@ fn new_with_blank_email() { .run(); let contents = fs::read_to_string(paths::root().join("foo/Cargo.toml")).unwrap(); - assert!(contents.contains(r#"authors = ["Sen"]"#), contents); + assert!(contents.contains(r#"authors = ["Sen"]"#), "{}", contents); } #[cargo_test] -- 2.39.5