]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-33903.rs
Merge commit '8da837185714cefbb261e93e9846afb11c1dc60e' into sync-rustfmt-subtree
[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() {}