summary refs log tree commit diff
path: root/src/test/mir-opt/exponential-or.rs
blob: 9fce7928f6a97a04d89eb7a4f781be2c258449d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Test that simple or-patterns don't get expanded to exponentially large CFGs

#![feature(or_patterns)]

// EMIT_MIR rustc.match_tuple.SimplifyCfg-initial.after.mir
fn match_tuple(x: (u32, bool, Option<i32>, u32)) -> u32 {
    match x {
        (y @ (1 | 4), true | false, Some(1 | 8) | None, z @ (6..=9 | 13..=16)) => y ^ z,
        _ => 0,
    }
}

fn main() {}