]> git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/issues/issue-74101.rs
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / const-generics / issues / issue-74101.rs
1 // [full] check-pass
2 // revisions: full min
3 #![cfg_attr(full, feature(adt_const_params))]
4 #![cfg_attr(full, allow(incomplete_features))]
5
6 fn test<const N: [u8; 1 + 2]>() {}
7 //[min]~^ ERROR `[u8; _]` is forbidden as the type of a const generic parameter
8
9 struct Foo<const N: [u8; 1 + 2]>;
10 //[min]~^ ERROR `[u8; _]` is forbidden as the type of a const generic parameter
11
12 fn main() {}