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 {
17 if true { true } else { false }
21 fn test_match(x: bool) -> bool {
28 #[allow(clippy::needless_return)]
29 fn test_match_with_unreachable(x: bool) -> bool {
32 false => unreachable!(),
36 #[allow(clippy::never_loop)]
37 fn test_loop() -> bool {
43 #[allow(clippy::never_loop)]
44 fn test_loop_with_block() -> bool {
52 #[allow(clippy::never_loop)]
53 fn test_loop_with_nests() -> bool {
63 #[allow(clippy::redundant_pattern_matching)]
64 fn test_loop_with_if_let() -> bool {
66 if let Some(x) = Some(true) {
78 fn test_panic() -> bool {
82 fn test_return_macro() -> String {
83 format!("test {}", "test")
87 let _ = test_end_of_fn();
88 let _ = test_if_block();
89 let _ = test_match(true);
90 let _ = test_match_with_unreachable(true);
92 let _ = test_loop_with_block();
93 let _ = test_loop_with_nests();
94 let _ = test_loop_with_if_let();
96 let _ = test_return_macro();