X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=tests%2Fui%2Fexpect_fun_call.fixed;h=53e45d28bded91a7ab772f5aa2afd15c3f8a379e;hb=4bae06d73c8c53e5b0aabc90203f808932d2b021;hp=a756d1cf50659473e1c43bbaca97ed675b9c4755;hpb=eb80ac4e721bf5d7b4f03fd68031ddd52d76d8a0;p=rust.git diff --git a/tests/ui/expect_fun_call.fixed b/tests/ui/expect_fun_call.fixed index a756d1cf506..53e45d28bde 100644 --- a/tests/ui/expect_fun_call.fixed +++ b/tests/ui/expect_fun_call.fixed @@ -1,9 +1,16 @@ // run-rustfix #![warn(clippy::expect_fun_call)] +#![allow(clippy::to_string_in_format_args)] /// Checks implementation of the `EXPECT_FUN_CALL` lint +macro_rules! one { + () => { + 1 + }; +} + fn main() { struct Foo; @@ -30,6 +37,9 @@ fn main() { let with_none_and_as_str: Option = None; with_none_and_as_str.unwrap_or_else(|| panic!("Error {}: fake error", error_code)); + let with_none_and_format_with_macro: Option = None; + with_none_and_format_with_macro.unwrap_or_else(|| panic!("Error {}: fake error", one!())); + let with_ok: Result<(), ()> = Ok(()); with_ok.expect("error");