2 #![warn(clippy::blocks_in_if_conditions)]
3 #![allow(unused, clippy::let_and_return)]
4 #![warn(clippy::nonminimal_bool)]
10 macro_rules! blocky_too {
23 fn condition_has_block() -> i32 {
34 fn condition_has_block_with_single_expression() -> i32 {
35 if { true } { 6 } else { 10 }
38 fn condition_is_normal() -> i32 {
40 if true && x == 3 { 6 } else { 10 }
43 fn condition_is_unsafe_block() {
46 // this should not warn because the condition is an unsafe block
47 if unsafe { 1u32 == std::mem::transmute(a) } {
48 println!("1u32 == a");
52 fn block_in_assert() {