Stabilize const_indexing feature
This commit is contained in:
parent
600fcc7159
commit
45abb1ba84
2 changed files with 2 additions and 22 deletions
|
|
@ -1,19 +0,0 @@
|
|||
# `const_indexing`
|
||||
|
||||
The tracking issue for this feature is: [#29947]
|
||||
|
||||
[#29947]: https://github.com/rust-lang/rust/issues/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];
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue