mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Stabilize const_indexing feature
This commit is contained in:
parent
600fcc7159
commit
45abb1ba84
@ -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];
|
||||
```
|
@ -217,9 +217,6 @@ declare_features! (
|
||||
// Allows the definition of `const fn` functions.
|
||||
(active, const_fn, "1.2.0", Some(24111)),
|
||||
|
||||
// Allows indexing into constant arrays.
|
||||
(active, const_indexing, "1.4.0", Some(29947)),
|
||||
|
||||
// Allows using #[prelude_import] on glob `use` items.
|
||||
//
|
||||
// rustc internal
|
||||
@ -490,6 +487,8 @@ declare_features! (
|
||||
(accepted, augmented_assignments, "1.8.0", Some(28235)),
|
||||
// allow empty structs and enum variants with braces
|
||||
(accepted, braced_empty_structs, "1.8.0", Some(29720)),
|
||||
// Allows indexing into constant arrays.
|
||||
(accepted, const_indexing, "1.24.0", Some(29947)),
|
||||
(accepted, default_type_params, "1.0.0", None),
|
||||
(accepted, globs, "1.0.0", None),
|
||||
(accepted, if_let, "1.0.0", None),
|
||||
|
Loading…
Reference in New Issue
Block a user