1 #![warn(clippy::panic_in_result_fn)]
2 #![allow(clippy::unnecessary_wraps)]
7 fn result_with_assert_with_message(x: i32) -> Result<bool, String> // should emit lint
9 assert!(x == 5, "wrong argument");
13 fn result_with_assert_eq(x: i32) -> Result<bool, String> // should emit lint
19 fn result_with_assert_ne(x: i32) -> Result<bool, String> // should emit lint
25 fn other_with_assert_with_message(x: i32) // should not emit lint
27 assert!(x == 5, "wrong argument");
30 fn other_with_assert_eq(x: i32) // should not emit lint
35 fn other_with_assert_ne(x: i32) // should not emit lint
40 fn result_without_banned_functions() -> Result<bool, String> // should not emit lint
42 let assert = "assert!";
43 println!("No {}", assert);