Files
rust/tests/ui/const-generics/generic-const-array-pattern-ice-139815.rs

17 lines
305 B
Rust
Raw Permalink Normal View History

//@ compile-flags: --crate-type=lib
#![allow(incomplete_features)]
2025-04-15 22:46:29 +02:00
#![feature(generic_const_exprs)]
2025-04-15 22:46:29 +02:00
fn is_123<const N: usize>(
x: [u32; {
//~^ ERROR overly complex generic constant
2025-04-15 22:46:29 +02:00
N + 1;
5
}],
) -> bool {
match x {
[1, 2] => true,
_ => false,
}
}