3 #![warn(clippy::implicit_return)]
4 #![allow(clippy::needless_return, unused)]
6 fn test_end_of_fn() -> bool {
15 #[allow(clippy::needless_bool)]
16 fn test_if_block() -> bool {
24 #[allow(clippy::match_bool)]
26 fn test_match(x: bool) -> bool {
33 #[allow(clippy::match_bool, clippy::needless_return)]
34 fn test_match_with_unreachable(x: bool) -> bool {
37 false => unreachable!(),
41 #[allow(clippy::never_loop)]
42 fn test_loop() -> bool {
48 #[allow(clippy::never_loop)]
49 fn test_loop_with_block() -> bool {
57 #[allow(clippy::never_loop)]
58 fn test_loop_with_nests() -> bool {
68 #[allow(clippy::redundant_pattern_matching)]
69 fn test_loop_with_if_let() -> bool {
71 if let Some(x) = Some(true) {
83 fn test_panic() -> bool {
87 fn test_return_macro() -> String {
88 format!("test {}", "test")
92 let _ = test_end_of_fn();
93 let _ = test_if_block();
94 let _ = test_match(true);
95 let _ = test_match_with_unreachable(true);
97 let _ = test_loop_with_block();
98 let _ = test_loop_with_nests();
99 let _ = test_loop_with_if_let();
101 let _ = test_return_macro();