Skip to content

Commit 9843d4e

Browse files
committed
update stacked_if_match.fixed
1 parent 9f02a9d commit 9843d4e

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

tests/ui/stacked_if_match.fixed

+26
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,32 @@ fn match_no_lint() {
7777
}
7878
}
7979

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+
let x = 0;
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+
80106
macro_rules! if_macro {
81107
($var:ident) => {
82108
if $var == 1 { true } else { false }

0 commit comments

Comments
 (0)