summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/issues/issue-71169.rs
blob: e4ec6b073761346d080ee8f9c25589e68f1b84ac (plain)
1
2
3
4
5
6
7
8
9
10
11
// revisions: full min
#![cfg_attr(full, feature(adt_const_params))]
#![cfg_attr(full, allow(incomplete_features))]

fn foo<const LEN: usize, const DATA: [u8; LEN]>() {}
//~^ ERROR the type of const parameters must not
//[min]~^^ ERROR `[u8; LEN]` is forbidden as the type of a const generic parameter
fn main() {
    const DATA: [u8; 4] = *b"ABCD";
    foo::<4, DATA>();
}