We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd67825 commit 0f82ab1Copy full SHA for 0f82ab1
tests/ui/stacked_if_match.fixed
@@ -77,6 +77,32 @@ fn match_no_lint() {
77
}
78
79
80
+fn if_match_no_lint() {
81
+ let x = 0;
82
+ if match x {
83
+ 1 => 2,
84
+ _ => 3,
85
+ } == 4
86
+ {
87
+ println!("true");
88
+ }
89
+}
90
+
91
+fn match_if_no_lint() {
92
93
+ match if x == 1 {
94
+ let y = 2;
95
+ y + 1
96
+ } else {
97
+ let z = 3;
98
+ z + 1
99
+ } {
100
+ 1 => {},
101
+ 2 => {},
102
+ _ => {},
103
104
105
106
macro_rules! if_macro {
107
($var:ident) => {
108
if $var == 1 { true } else { false }
0 commit comments