]> git.lizzy.rs Git - rust.git/commitdiff
Stabilize const_indexing feature
authorOliver Schneider <git-no-reply-9879165716479413131@oli-obk.de>
Mon, 29 Jan 2018 19:46:42 +0000 (20:46 +0100)
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>
Thu, 8 Mar 2018 07:34:14 +0000 (08:34 +0100)
src/doc/unstable-book/src/language-features/const-indexing.md [deleted file]
src/libsyntax/feature_gate.rs

diff --git a/src/doc/unstable-book/src/language-features/const-indexing.md b/src/doc/unstable-book/src/language-features/const-indexing.md
deleted file mode 100644 (file)
index 42d46ce..0000000
+++ /dev/null
@@ -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];
-```
\ No newline at end of file
index 45d82bc7af38e824e40ca2d9d27d0c787ae690ca..1a790bf78bd86172eb153630b7649042989f4663 100644 (file)
@@ -217,9 +217,6 @@ pub fn walk_feature_fields<F>(&self, mut f: F)
     // 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 @@ pub fn walk_feature_fields<F>(&self, mut f: F)
     (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),