rust/tests/ui/const-generics/generic_const_exprs/abstract-consts-as-cast-5.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
238 B
Rust
Raw Normal View History

2021-09-07 07:24:04 -05:00
#![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>() {}
2021-09-07 07:36:50 -05:00
fn main() {}