summary refs log tree commit diff
path: root/src/test/ui/const-generics/generic-param-mismatch.rs
blob: e409094eb734ca20bc19491e72c0a4cca4954a21 (plain)
1
2
3
4
5
6
7
8
9
10
// revisions: full min
#![cfg_attr(full, allow(incomplete_features))]
#![cfg_attr(full, feature(const_generics))]
#![cfg_attr(min, feature(min_const_generics))]

fn test<const N: usize, const M: usize>() -> [u8; M] {
    [0; N] //~ ERROR mismatched types
}

fn main() {}