Add a test for match flattening
This commit is contained in:
parent
bc03234e25
commit
f116baeed7
2 changed files with 44 additions and 0 deletions
21
tests/source/match-flattening.rs
Normal file
21
tests/source/match-flattening.rs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
fn main() {
|
||||
match option {
|
||||
None => if condition {
|
||||
true
|
||||
} else {
|
||||
false
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
match option {
|
||||
None => {
|
||||
if condition {
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
23
tests/target/match-flattening.rs
Normal file
23
tests/target/match-flattening.rs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
fn main() {
|
||||
match option {
|
||||
None => {
|
||||
if condition {
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
match option {
|
||||
None => {
|
||||
if condition {
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue