]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/expect_fun_call.fixed
Use source callsite in FormatArgsExpn::inputs_span
[rust.git] / tests / ui / expect_fun_call.fixed
index cf923a6a5940c3574216eca71be849f9cd89d6e5..53e45d28bded91a7ab772f5aa2afd15c3f8a379e 100644 (file)
@@ -5,6 +5,12 @@
 
 /// Checks implementation of the `EXPECT_FUN_CALL` lint
 
+macro_rules! one {
+    () => {
+        1
+    };
+}
+
 fn main() {
     struct Foo;
 
@@ -31,6 +37,9 @@ fn main() {
     let with_none_and_as_str: Option<i32> = None;
     with_none_and_as_str.unwrap_or_else(|| panic!("Error {}: fake error", error_code));
 
+    let with_none_and_format_with_macro: Option<i32> = None;
+    with_none_and_format_with_macro.unwrap_or_else(|| panic!("Error {}: fake error", one!()));
+
     let with_ok: Result<(), ()> = Ok(());
     with_ok.expect("error");