]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-33903.rs
Merge commit '05677b6bd6c938ed760835d9b1f6514992654ae3' into sync_cg_clif-2021-08-06
[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() {}