mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 08:05:12 +00:00
22 lines
418 B
Rust
22 lines
418 B
Rust
// unit-test: ConstGoto
|
|
|
|
// EMIT_MIR const_goto_storage.match_nested_if.ConstGoto.diff
|
|
fn match_nested_if() -> bool {
|
|
let val = match () {
|
|
() if if if if true { true } else { false } { true } else { false } {
|
|
true
|
|
} else {
|
|
false
|
|
} =>
|
|
{
|
|
true
|
|
}
|
|
_ => false,
|
|
};
|
|
val
|
|
}
|
|
|
|
fn main() {
|
|
let _ = match_nested_if();
|
|
}
|