about summary refs log tree commit diff
path: root/tests/ui/consts/const-fn-const-eval.rs
blob: 25abca0fb43d23c23747df8e63b81879c17c71b2 (plain)
1
2
3
4
5
6
7
8
9
10
//@ run-pass
#![allow(dead_code)]

const fn add(x: usize, y: usize) -> usize {
    x + y
}

const ARR: [i32; add(1, 2)] = [5, 6, 7];

pub fn main() {}