]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/exponential_or.rs
Rollup merge of #106605 - notriddle:notriddle/outdated-rustbook, r=GuillaumeGomez
[rust.git] / tests / mir-opt / exponential_or.rs
1 // Test that simple or-patterns don't get expanded to exponentially large CFGs
2
3 // EMIT_MIR exponential_or.match_tuple.SimplifyCfg-initial.after.mir
4 fn match_tuple(x: (u32, bool, Option<i32>, u32)) -> u32 {
5     match x {
6         (y @ (1 | 4), true | false, Some(1 | 8) | None, z @ (6..=9 | 13..=16)) => y ^ z,
7         _ => 0,
8     }
9 }
10
11 fn main() {}