about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan MacKenzie <ecstaticmorse@gmail.com>2019-12-10 12:41:58 -0800
committerDylan MacKenzie <ecstaticmorse@gmail.com>2019-12-13 10:38:29 -0800
commit57959b2bdcd047745f3b403c25cc470c9a0889d9 (patch)
tree5fe5f2e9655e8e4df7e822506e0313a324130f98
parent8f3021bd2cc49eda82ae01ac2e769a7e0fd0aa36 (diff)
downloadrust-57959b2bdcd047745f3b403c25cc470c9a0889d9.tar.gz
rust-57959b2bdcd047745f3b403c25cc470c9a0889d9.zip
Add feature gate for `const_loop`
-rw-r--r--src/librustc_feature/active.rs3
-rw-r--r--src/libsyntax_pos/symbol.rs1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/librustc_feature/active.rs b/src/librustc_feature/active.rs
index 8794d830961..91a84f711f2 100644
--- a/src/librustc_feature/active.rs
+++ b/src/librustc_feature/active.rs
@@ -538,6 +538,9 @@ declare_features! (
     /// Allows using `&mut` in constant functions.
     (active, const_mut_refs, "1.41.0", Some(57349), None),
 
+    /// Allows the use of `loop` and `while` in constants.
+    (active, const_loop, "1.42.0", Some(52000), None),
+
     // -------------------------------------------------------------------------
     // feature-group-end: actual feature gates
     // -------------------------------------------------------------------------
diff --git a/src/libsyntax_pos/symbol.rs b/src/libsyntax_pos/symbol.rs
index 92de56bd09a..6e48747da99 100644
--- a/src/libsyntax_pos/symbol.rs
+++ b/src/libsyntax_pos/symbol.rs
@@ -213,6 +213,7 @@ symbols! {
         const_indexing,
         const_in_array_repeat_expressions,
         const_let,
+        const_loop,
         const_mut_refs,
         const_panic,
         const_raw_ptr_deref,