mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-30 14:52:56 +03:00
Add a test for match flattening
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
fn main() {
|
||||
match option {
|
||||
None => if condition {
|
||||
true
|
||||
} else {
|
||||
false
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
match option {
|
||||
None => {
|
||||
if condition {
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
fn main() {
|
||||
match option {
|
||||
None => {
|
||||
if condition {
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
match option {
|
||||
None => {
|
||||
if condition {
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user