]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/const_goto_const_eval_fail.rs
Merge commit '1480cea393d0cee195e59949eabdfbcf1230f7f9' into clippyup
[rust.git] / tests / mir-opt / const_goto_const_eval_fail.rs
1 #![feature(min_const_generics)]
2 #![crate_type = "lib"]
3
4 // If const eval fails, then don't crash
5 // EMIT_MIR const_goto_const_eval_fail.f.ConstGoto.diff
6 pub fn f<const A: i32, const B: bool>() -> u64 {
7     match {
8         match A {
9             1 | 2 | 3 => B,
10             _ => true,
11         }
12     } {
13         false => 1,
14         true => 2,
15     }
16 }