about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSamuel E. Moelius III <sam@moeli.us>2021-09-30 07:40:46 -0400
committerSamuel E. Moelius III <sam@moeli.us>2021-10-15 12:44:49 -0400
commit47014d81a1e1adbd5dcfbc4d6df5d116d1b36104 (patch)
tree6260a2e0c40e1256d6164bd941d09a7d64d89ff9
parentc9599d79a3b741b7c42353dc45eab6f1c461891f (diff)
downloadrust-47014d81a1e1adbd5dcfbc4d6df5d116d1b36104.tar.gz
rust-47014d81a1e1adbd5dcfbc4d6df5d116d1b36104.zip
Fix adjacent tests
-rw-r--r--tests/ui/expect_fun_call.fixed1
-rw-r--r--tests/ui/expect_fun_call.rs1
-rw-r--r--tests/ui/expect_fun_call.stderr24
-rw-r--r--tests/ui/format.fixed2
-rw-r--r--tests/ui/format.rs2
-rw-r--r--tests/ui/to_string_in_display.rs2
6 files changed, 17 insertions, 15 deletions
diff --git a/tests/ui/expect_fun_call.fixed b/tests/ui/expect_fun_call.fixed
index a756d1cf506..cf923a6a594 100644
--- a/tests/ui/expect_fun_call.fixed
+++ b/tests/ui/expect_fun_call.fixed
@@ -1,6 +1,7 @@
 // run-rustfix
 
 #![warn(clippy::expect_fun_call)]
+#![allow(clippy::to_string_in_format_args)]
 
 /// Checks implementation of the `EXPECT_FUN_CALL` lint
 
diff --git a/tests/ui/expect_fun_call.rs b/tests/ui/expect_fun_call.rs
index 60bbaa89d42..e6f252259df 100644
--- a/tests/ui/expect_fun_call.rs
+++ b/tests/ui/expect_fun_call.rs
@@ -1,6 +1,7 @@
 // run-rustfix
 
 #![warn(clippy::expect_fun_call)]
+#![allow(clippy::to_string_in_format_args)]
 
 /// Checks implementation of the `EXPECT_FUN_CALL` lint
 
diff --git a/tests/ui/expect_fun_call.stderr b/tests/ui/expect_fun_call.stderr
index 6dc796f5cee..ac48a06671c 100644
--- a/tests/ui/expect_fun_call.stderr
+++ b/tests/ui/expect_fun_call.stderr
@@ -1,5 +1,5 @@
 error: use of `expect` followed by a function call
-  --> $DIR/expect_fun_call.rs:28:26
+  --> $DIR/expect_fun_call.rs:29:26
    |
 LL |     with_none_and_format.expect(&format!("Error {}: fake error", error_code));
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("Error {}: fake error", error_code))`
@@ -7,67 +7,67 @@ LL |     with_none_and_format.expect(&format!("Error {}: fake error", error_code
    = note: `-D clippy::expect-fun-call` implied by `-D warnings`
 
 error: use of `expect` followed by a function call
-  --> $DIR/expect_fun_call.rs:31:26
+  --> $DIR/expect_fun_call.rs:32:26
    |
 LL |     with_none_and_as_str.expect(format!("Error {}: fake error", error_code).as_str());
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("Error {}: fake error", error_code))`
 
 error: use of `expect` followed by a function call
-  --> $DIR/expect_fun_call.rs:41:25
+  --> $DIR/expect_fun_call.rs:42:25
    |
 LL |     with_err_and_format.expect(&format!("Error {}: fake error", error_code));
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| panic!("Error {}: fake error", error_code))`
 
 error: use of `expect` followed by a function call
-  --> $DIR/expect_fun_call.rs:44:25
+  --> $DIR/expect_fun_call.rs:45:25
    |
 LL |     with_err_and_as_str.expect(format!("Error {}: fake error", error_code).as_str());
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| panic!("Error {}: fake error", error_code))`
 
 error: use of `expect` followed by a function call
-  --> $DIR/expect_fun_call.rs:56:17
+  --> $DIR/expect_fun_call.rs:57:17
    |
 LL |     Some("foo").expect(format!("{} {}", 1, 2).as_ref());
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("{} {}", 1, 2))`
 
 error: use of `expect` followed by a function call
-  --> $DIR/expect_fun_call.rs:77:21
+  --> $DIR/expect_fun_call.rs:78:21
    |
 LL |         Some("foo").expect(&get_string());
    |                     ^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { panic!("{}", get_string()) })`
 
 error: use of `expect` followed by a function call
-  --> $DIR/expect_fun_call.rs:78:21
+  --> $DIR/expect_fun_call.rs:79:21
    |
 LL |         Some("foo").expect(get_string().as_ref());
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { panic!("{}", get_string()) })`
 
 error: use of `expect` followed by a function call
-  --> $DIR/expect_fun_call.rs:79:21
+  --> $DIR/expect_fun_call.rs:80:21
    |
 LL |         Some("foo").expect(get_string().as_str());
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { panic!("{}", get_string()) })`
 
 error: use of `expect` followed by a function call
-  --> $DIR/expect_fun_call.rs:81:21
+  --> $DIR/expect_fun_call.rs:82:21
    |
 LL |         Some("foo").expect(get_static_str());
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { panic!("{}", get_static_str()) })`
 
 error: use of `expect` followed by a function call
-  --> $DIR/expect_fun_call.rs:82:21
+  --> $DIR/expect_fun_call.rs:83:21
    |
 LL |         Some("foo").expect(get_non_static_str(&0));
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { panic!("{}", get_non_static_str(&0).to_string()) })`
 
 error: use of `expect` followed by a function call
-  --> $DIR/expect_fun_call.rs:86:16
+  --> $DIR/expect_fun_call.rs:87:16
    |
 LL |     Some(true).expect(&format!("key {}, {}", 1, 2));
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("key {}, {}", 1, 2))`
 
 error: use of `expect` followed by a function call
-  --> $DIR/expect_fun_call.rs:92:17
+  --> $DIR/expect_fun_call.rs:93:17
    |
 LL |         opt_ref.expect(&format!("{:?}", opt_ref));
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("{:?}", opt_ref))`
diff --git a/tests/ui/format.fixed b/tests/ui/format.fixed
index 5dd64140e81..73fc750511c 100644
--- a/tests/ui/format.fixed
+++ b/tests/ui/format.fixed
@@ -1,6 +1,6 @@
 // run-rustfix
 
-#![allow(clippy::print_literal, clippy::redundant_clone)]
+#![allow(clippy::print_literal, clippy::redundant_clone, clippy::to_string_in_format_args)]
 #![warn(clippy::useless_format)]
 
 struct Foo(pub String);
diff --git a/tests/ui/format.rs b/tests/ui/format.rs
index 4599fb5207e..2f4595650cb 100644
--- a/tests/ui/format.rs
+++ b/tests/ui/format.rs
@@ -1,6 +1,6 @@
 // run-rustfix
 
-#![allow(clippy::print_literal, clippy::redundant_clone)]
+#![allow(clippy::print_literal, clippy::redundant_clone, clippy::to_string_in_format_args)]
 #![warn(clippy::useless_format)]
 
 struct Foo(pub String);
diff --git a/tests/ui/to_string_in_display.rs b/tests/ui/to_string_in_display.rs
index eb8105c6b6d..3ccdcd1117b 100644
--- a/tests/ui/to_string_in_display.rs
+++ b/tests/ui/to_string_in_display.rs
@@ -1,5 +1,5 @@
 #![warn(clippy::to_string_in_display)]
-#![allow(clippy::inherent_to_string_shadow_display)]
+#![allow(clippy::inherent_to_string_shadow_display, clippy::to_string_in_format_args)]
 
 use std::fmt;