about summary refs log tree commit diff
path: root/src/libsyntax/errors
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-12-01 19:47:38 +0000
committerbors <bors@rust-lang.org>2015-12-01 19:47:38 +0000
commiteb1d018c01f70bcfc38bc8365a3de71c1564f694 (patch)
tree7a51d7797a6208287abeafe16f3e53b0ba26ab11 /src/libsyntax/errors
parentdfe88bf1e5a87861ccaf57ea45f3ebe0e8c2de7d (diff)
parent64051221b624ef35a449213bc54dc631ffa8a65b (diff)
downloadrust-eb1d018c01f70bcfc38bc8365a3de71c1564f694.tar.gz
rust-eb1d018c01f70bcfc38bc8365a3de71c1564f694.zip
Auto merge of #25570 - oli-obk:const_indexing, r=nikomatsakis
This PR allows the constant evaluation of index operations on constant arrays and repeat expressions. This allows index expressions to appear in the expression path of the length expression of a repeat expression or an array type.

An example is

```rust
const ARR: [usize; 5] = [1, 2, 3, 4, 5];
const ARR2: [usize; ARR[1]] = [42, 99];
```

In most other locations llvm's const evaluator figures it out already. This is not specific to index expressions and could be remedied in the future.
Diffstat (limited to 'src/libsyntax/errors')
0 files changed, 0 insertions, 0 deletions