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