about summary refs log tree commit diff
path: root/tests/ui/consts/issue-29914.rs
blob: 7897733c72389180a87b519d61cd4f9bc45f97e4 (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]]);
}