]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-33903.rs
Merge commit '40dd3e2b7089b5e96714e064b731f6dbf17c61a9' into sync_cg_clif-2021-05-27
[rust.git] / src / test / ui / issues / issue-33903.rs
1 // check-pass
2 #![allow(dead_code)]
3 // Issue 33903:
4 // Built-in indexing should be used even when the index is not
5 // trivially an integer
6 // Only built-in indexing can be used in constant expressions
7
8 const FOO: i32 = [12, 34][0 + 1];
9
10 fn main() {}