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

fn foo<const N: usize>() {
    let _ = [0u64; N + 1];
    //[full]~^ ERROR constant expression depends on a generic parameter
    //[min]~^^ ERROR generic parameters may not be used in const operations
}

fn main() {}