1 // Tests miscellaneous well-formedness examples.
4 #![cfg_attr(full, feature(const_generics))]
5 #![cfg_attr(full, allow(incomplete_features))]
7 pub fn arr_len<const N: usize>() {
9 //[full]~^ ERROR constant expression depends on a generic parameter
10 //[min]~^^ ERROR generic parameters may not be used in const operations
13 struct Const<const N: usize>;
15 pub fn func_call<const N: usize>() {
16 let _: Const::<{N + 1}>;
17 //[full]~^ ERROR constant expression depends on a generic parameter
18 //[min]~^^ ERROR generic parameters may not be used in const operations