about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-03-11 20:50:18 -0500
committerCorey Farwell <coreyf@rwell.org>2017-03-13 21:38:24 -0400
commit0dd03ffaf72d317d7fed27562fa2c76061cd3aff (patch)
treee4469dc47d6826e8f534cc709b063a92d2c26df2 /src
parent327e8e9196b638c4ed35ab2d57d550a3138a628b (diff)
downloadrust-0dd03ffaf72d317d7fed27562fa2c76061cd3aff.tar.gz
rust-0dd03ffaf72d317d7fed27562fa2c76061cd3aff.zip
Rust unstable book: basic desc and example for `const_indexing`.
Diffstat (limited to 'src')
-rw-r--r--src/doc/unstable-book/src/const-indexing.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/doc/unstable-book/src/const-indexing.md b/src/doc/unstable-book/src/const-indexing.md
index bd92b0b1b47..42d46ce15f6 100644
--- a/src/doc/unstable-book/src/const-indexing.md
+++ b/src/doc/unstable-book/src/const-indexing.md
@@ -6,5 +6,14 @@ The tracking issue for this feature is: [#29947]
 
 ------------------------
 
+The `const_indexing` feature allows the constant evaluation of index operations
+on constant arrays and repeat expressions.
 
+## Examples
 
+```rust
+#![feature(const_indexing)]
+
+const ARR: [usize; 5] = [1, 2, 3, 4, 5];
+const ARR2: [usize; ARR[1]] = [42, 99];
+```
\ No newline at end of file