1 #![warn(clippy::panic_in_result_fn)]
2 #![allow(clippy::unnecessary_wraps)]
7 fn result_with_panic() -> Result<bool, String> // should emit lint
12 fn result_with_unimplemented() -> Result<bool, String> // should emit lint
17 fn result_with_unreachable() -> Result<bool, String> // should emit lint
22 fn result_with_todo() -> Result<bool, String> // should emit lint
27 fn other_with_panic() // should not emit lint
32 fn other_with_unreachable() // should not emit lint
37 fn other_with_unimplemented() // should not emit lint
42 fn other_with_todo() // should not emit lint
47 fn result_without_banned_functions() -> Result<bool, String> // should not emit lint
53 fn function_result_with_panic() -> Result<bool, String> // should emit lint
59 println!("something");
62 fn function_result_with_custom_todo() -> Result<bool, String> // should not emit lint
68 fn main() -> Result<(), String> {
69 todo!("finish main method");