summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/issue-29914.rs
blob: 6da63664dfa0001a46ea022e2d8397ba66cb541b (plain)
1
2
3
4
5
6
7
8
9
10
// run-pass
#![allow(stable_features)]

#![feature(const_indexing)]

const ARR: [usize; 5] = [5, 4, 3, 2, 1];

fn main() {
    assert_eq!(3, ARR[ARR[3]]);
}