rust/tests/ui/const-generics/generic_const_exprs/abstract-consts-as-cast-5.rs
2023-01-11 09:32:08 +00:00

12 lines
238 B
Rust

#![feature(generic_const_exprs)]
#![allow(incomplete_features)]
fn foo<const N: u8>(a: [(); N as usize]) {
bar::<{ N as usize as usize }>();
//~^ error: unconstrained generic constant
}
fn bar<const N: usize>() {}
fn main() {}