]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/issues/issue-62878.rs
Auto merge of #79012 - tgnottingham:span_data_to_lines_and_cols, r=estebank
[rust.git] / src / test / ui / const-generics / issues / issue-62878.rs
1 // revisions: full min
2 #![cfg_attr(full, feature(const_generics))]
3 #![cfg_attr(full, allow(incomplete_features))]
4
5 fn foo<const N: usize, const A: [u8; N]>() {}
6 //~^ ERROR the type of const parameters must not
7 //[min]~| ERROR `[u8; _]` is forbidden as the type of a const generic parameter
8
9 fn main() {
10     foo::<_, {[1]}>();
11     //[full]~^ ERROR type provided when a constant was expected
12     //[full]~| ERROR mismatched types
13 }