]> git.lizzy.rs Git - rust.git/blob - tests/ui/array-slice-vec/array_const_index-2.rs
Merge commit '1480cea393d0cee195e59949eabdfbcf1230f7f9' into clippyup
[rust.git] / tests / ui / array-slice-vec / array_const_index-2.rs
1 // run-pass
2 #![allow(dead_code)]
3 #![allow(stable_features)]
4
5 #![feature(const_indexing)]
6
7 fn main() {
8     const ARR: [i32; 6] = [42, 43, 44, 45, 46, 47];
9     const IDX: usize = 3;
10     const VAL: i32 = ARR[IDX];
11     const BLUB: [i32; (ARR[0] - 41) as usize] = [5];
12 }