]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/wf-misc.rs
Rollup merge of #74333 - poliorcetics:std-alloc-unsafe-op-in-unsafe-fn, r=LukasKalbertodt
[rust.git] / src / test / ui / const-generics / wf-misc.rs
1 #![feature(const_generics)]
2 //~^ WARN the feature `const_generics` is incomplete
3
4 pub fn arr_len<const N: usize>() {
5     let _: [u8; N + 1];
6     //~^ ERROR constant expression depends on a generic parameter
7 }
8
9 struct Const<const N: usize>;
10
11 pub fn func_call<const N: usize>() {
12     let _: Const::<{N + 1}>;
13     //~^ ERROR constant expression depends on a generic parameter
14 }
15
16 fn main() {}