From 3cca4ceed833493b7ce18c825f14ddd927920e10 Mon Sep 17 00:00:00 2001 From: David Wood Date: Wed, 12 Jun 2019 07:56:07 +0100 Subject: syntax: Add feature gate. This commit adds a `const_in_array_repeat_expressions` feature gate and only create `Candidate::Repeat` if it is enabled. --- src/libsyntax/feature_gate.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index fd1cb3d803b..ca3e6d254bd 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -562,10 +562,10 @@ declare_features! ( // Allows `if/while p && let q = r && ...` chains. (active, let_chains, "1.37.0", Some(53667), None), - // #[repr(transparent)] on enums. + // Allows #[repr(transparent)] on enums (RFC 2645). (active, transparent_enums, "1.37.0", Some(60405), None), - // #[repr(transparent)] on unions. + // Allows #[repr(transparent)] on unions (RFC 2645). (active, transparent_unions, "1.37.0", Some(60405), None), // Allows explicit discriminants on non-unit enum variants. @@ -580,6 +580,9 @@ declare_features! ( // Allows the use of `#[cfg(doctest)]`, set when rustdoc is collecting doctests (active, cfg_doctest, "1.37.0", Some(62210), None), + // Allows `[x; N]` where `x` is a constant (RFC 2203). + (active, const_in_array_repeat_expressions, "1.37.0", Some(49147), None), + // ------------------------------------------------------------------------- // feature-group-end: actual feature gates // ------------------------------------------------------------------------- -- cgit 1.4.1-3-g733a5