1 #![warn(clippy::panic_in_result_fn)]
2 #![allow(clippy::unnecessary_wraps)]
7 fn result_with_debug_assert_with_message(x: i32) -> Result<bool, String> // should emit lint
9 debug_assert!(x == 5, "wrong argument");
13 fn result_with_debug_assert_eq(x: i32) -> Result<bool, String> // should emit lint
15 debug_assert_eq!(x, 5);
19 fn result_with_debug_assert_ne(x: i32) -> Result<bool, String> // should emit lint
21 debug_assert_ne!(x, 1);
25 fn other_with_debug_assert_with_message(x: i32) // should not emit lint
27 debug_assert!(x == 5, "wrong argument");
30 fn other_with_debug_assert_eq(x: i32) // should not emit lint
32 debug_assert_eq!(x, 5);
35 fn other_with_debug_assert_ne(x: i32) // should not emit lint
37 debug_assert_ne!(x, 1);
40 fn result_without_banned_functions() -> Result<bool, String> // should not emit lint
42 let debug_assert = "debug_assert!";
43 println!("No {}", debug_assert);