2 #![feature(lint_reasons)]
3 #![warn(clippy::implicit_return)]
4 #![allow(clippy::needless_return, clippy::needless_bool, unused, clippy::never_loop)]
6 fn test_end_of_fn() -> bool {
15 fn test_if_block() -> bool {
16 if true { true } else { false }
20 fn test_match(x: bool) -> bool {
27 fn test_match_with_unreachable(x: bool) -> bool {
30 false => unreachable!(),
34 fn test_loop() -> bool {
40 fn test_loop_with_block() -> bool {
48 fn test_loop_with_nests() -> bool {
58 #[allow(clippy::redundant_pattern_matching)]
59 fn test_loop_with_if_let() -> bool {
61 if let Some(x) = Some(true) {
73 fn test_panic() -> bool {
77 fn test_return_macro() -> String {
78 format!("test {}", "test")
81 fn macro_branch_test() -> bool {
83 ($t:expr, $f:expr) => {
84 if true { $t } else { $f }
90 fn loop_test() -> bool {
107 fn loop_macro_test() -> bool {
118 fn divergent_test() -> bool {
126 async fn foo() -> bool {
132 fn check_expect() -> bool {
138 #[expect(clippy::implicit_return)]