about summary refs log tree commit diff
path: root/tests/ui/const-generics/suggest_const_for_array.rs
blob: b52fd152f976a0d7bf864c1b15f3be082739b9f9 (plain)
1
2
3
4
5
6
7
8
9
10
#![crate_type = "lib"]

fn example<const N: usize>() {}

fn other() {
    example::<[usize; 3]>();
    //~^ ERROR type provided when a const
    example::<[usize; 4 + 5]>();
    //~^ ERROR type provided when a const
}