mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
12 lines
238 B
Rust
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() {}
|