1 #![warn(clippy::panic_in_result_fn)]
2 #![allow(clippy::unnecessary_wraps)]
6 fn result_with_panic() -> Result<bool, String> // should emit lint
11 fn result_with_unimplemented() -> Result<bool, String> // should emit lint
16 fn result_with_unreachable() -> Result<bool, String> // should emit lint
21 fn result_with_todo() -> Result<bool, String> // should emit lint
26 fn other_with_panic() // should not emit lint
31 fn other_with_unreachable() // should not emit lint
36 fn other_with_unimplemented() // should not emit lint
41 fn other_with_todo() // should not emit lint
46 fn result_without_banned_functions() -> Result<bool, String> // should not emit lint
52 fn function_result_with_panic() -> Result<bool, String> // should emit lint
58 println!("something");
61 fn function_result_with_custom_todo() -> Result<bool, String> // should not emit lint
67 fn main() -> Result<(), String> {
68 todo!("finish main method");