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

fn foo<const N: usize, const A: [u8; N]>() {}
//~^ ERROR the type of const parameters must not
//[min]~| ERROR `[u8; _]` is forbidden as the type of a const generic parameter

fn main() {
    foo::<_, {[1]}>();
    //[full]~^ ERROR wrong number of const arguments
    //[full]~| ERROR wrong number of type arguments
    //[full]~| ERROR mismatched types
}