mirror of
https://git.proxmox.com/git/rustc
synced 2025-06-02 17:28:12 +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() {}
|