2019-11-04 00:00:00 +00:00
|
|
|
// check-pass
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(dead_code)]
|
2018-01-01 22:49:01 +00:00
|
|
|
// Issue 33903:
|
|
|
|
// Built-in indexing should be used even when the index is not
|
|
|
|
// trivially an integer
|
2018-08-19 15:30:23 +02:00
|
|
|
// Only built-in indexing can be used in constant expressions
|
2018-01-01 22:49:01 +00:00
|
|
|
|
|
|
|
const FOO: i32 = [12, 34][0 + 1];
|
|
|
|
|
|
|
|
fn main() {}
|