]> git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/issues/issue-62878.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.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 #![cfg_attr(min, feature(min_const_generics))]
5
6 fn foo<const N: usize, const A: [u8; N]>() {}
7 //~^ ERROR the type of const parameters must not
8 //[min]~| ERROR `[u8; _]` is forbidden as the type of a const generic parameter
9
10 fn main() {
11 foo::<_, {[1]}>();
12 //[full]~^ ERROR wrong number of const arguments
13 //[full]~| ERROR wrong number of type arguments
14 //[full]~| ERROR mismatched types
15 }