]> git.proxmox.com Git - rustc.git/blame - src/test/ui/const-generics/issues/issue-71169.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / const-generics / issues / issue-71169.rs
CommitLineData
1b1a35ee 1// revisions: full min
94222f64 2#![cfg_attr(full, feature(adt_const_params))]
1b1a35ee 3#![cfg_attr(full, allow(incomplete_features))]
3dfed10e
XL
4
5fn foo<const LEN: usize, const DATA: [u8; LEN]>() {}
6//~^ ERROR the type of const parameters must not
1b1a35ee 7//[min]~^^ ERROR `[u8; _]` is forbidden as the type of a const generic parameter
3dfed10e
XL
8fn main() {
9 const DATA: [u8; 4] = *b"ABCD";
10 foo::<4, DATA>();
3dfed10e 11}