Skip to content

Commit

Permalink
update stacked_if_match.fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
promptkp committed Sep 16, 2024
1 parent cd67825 commit 0f82ab1
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/ui/stacked_if_match.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,32 @@ fn match_no_lint() {
}
}

fn if_match_no_lint() {
let x = 0;
if match x {
1 => 2,
_ => 3,
} == 4
{
println!("true");
}
}

fn match_if_no_lint() {
let x = 0;
match if x == 1 {
let y = 2;
y + 1
} else {
let z = 3;
z + 1
} {
1 => {},
2 => {},
_ => {},
}
}

macro_rules! if_macro {
($var:ident) => {
if $var == 1 { true } else { false }
Expand Down

0 comments on commit 0f82ab1

Please sign in to comment.