]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/expect_fun_call.fixed
Move MSRV tests into the lint specific test files
[rust.git] / tests / ui / expect_fun_call.fixed
index 53e45d28bded91a7ab772f5aa2afd15c3f8a379e..15172ae345c2e130161a811e1aca932376f6f899 100644 (file)
@@ -1,7 +1,6 @@
 // run-rustfix
-
 #![warn(clippy::expect_fun_call)]
-#![allow(clippy::to_string_in_format_args)]
+#![allow(clippy::to_string_in_format_args, clippy::uninlined_format_args)]
 
 /// Checks implementation of the `EXPECT_FUN_CALL` lint
 
@@ -101,4 +100,10 @@ fn main() {
         let opt_ref = &opt;
         opt_ref.unwrap_or_else(|| panic!("{:?}", opt_ref));
     }
+
+    let format_capture: Option<i32> = None;
+    format_capture.unwrap_or_else(|| panic!("{error_code}"));
+
+    let format_capture_and_value: Option<i32> = None;
+    format_capture_and_value.unwrap_or_else(|| panic!("{error_code}, {}", 1));
 }