summary refs log tree commit diff
path: root/src/test/ui/const-generics/issues/issue-74101.rs
blob: 2a7d31ac8dd662502b4e87c67afc51face437e70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// [full] check-pass
// revisions: full min
#![cfg_attr(full, feature(const_generics))]
#![cfg_attr(full, allow(incomplete_features))]
#![cfg_attr(min, feature(min_const_generics))]

fn test<const N: [u8; 1 + 2]>() {}
//[min]~^ ERROR `[u8; _]` is forbidden as the type of a const generic parameter

struct Foo<const N: [u8; 1 + 2]>;
//[min]~^ ERROR `[u8; _]` is forbidden as the type of a const generic parameter

fn main() {}