From 57959b2bdcd047745f3b403c25cc470c9a0889d9 Mon Sep 17 00:00:00 2001 From: Dylan MacKenzie Date: Tue, 10 Dec 2019 12:41:58 -0800 Subject: [PATCH] Add feature gate for `const_loop` --- src/librustc_feature/active.rs | 3 +++ src/libsyntax_pos/symbol.rs | 1 + 2 files changed, 4 insertions(+) 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,