1 #![warn(clippy::implicit_return)]
3 fn test_end_of_fn() -> bool {
12 #[allow(clippy::needless_bool)]
13 fn test_if_block() -> bool {
21 #[allow(clippy::match_bool)]
23 fn test_match(x: bool) -> bool {
30 #[allow(clippy::match_bool, clippy::needless_return)]
31 fn test_match_with_unreachable(x: bool) -> bool {
34 false => unreachable!(),
38 #[allow(clippy::never_loop)]
39 fn test_loop() -> bool {
45 #[allow(clippy::never_loop)]
46 fn test_loop_with_block() -> bool {
54 #[allow(clippy::never_loop)]
55 fn test_loop_with_nests() -> bool {
65 #[allow(clippy::redundant_pattern_matching)]
66 fn test_loop_with_if_let() -> bool {
68 if let Some(x) = Some(true) {
80 fn test_panic() -> bool {
84 fn test_return_macro() -> String {
85 format!("test {}", "test")
89 let _ = test_end_of_fn();
90 let _ = test_if_block();
91 let _ = test_match(true);
92 let _ = test_match_with_unreachable(true);
94 let _ = test_loop_with_block();
95 let _ = test_loop_with_nests();
96 let _ = test_loop_with_if_let();
98 let _ = test_return_macro();