From 4b4fc63eb7745639c76c1f8011239354a1823547 Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Fri, 28 Dec 2018 20:05:22 +0100 Subject: Stabilize `let` bindings and destructuring in constants and const fn --- src/libsyntax/feature_gate.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index cddec3eb23a..15cf4334154 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -193,9 +193,6 @@ declare_features! ( // Allows the definition of `const` functions with some advanced features. (active, const_fn, "1.2.0", Some(24111), None), - // Allows let bindings and destructuring in `const` functions and constants. - (active, const_let, "1.22.1", Some(48821), None), - // Allows accessing fields of unions inside `const` functions. (active, const_fn_union, "1.27.0", Some(51909), None), @@ -688,6 +685,8 @@ declare_features! ( (accepted, min_const_unsafe_fn, "1.33.0", Some(55607), None), // `#[cfg_attr(predicate, multiple, attributes, here)]` (accepted, cfg_attr_multi, "1.33.0", Some(54881), None), + // Allows let bindings and destructuring in `const` functions and constants. + (accepted, const_let, "1.33.0", Some(48821), None), ); // If you change this, please modify `src/doc/unstable-book` as well. You must -- cgit 1.4.1-3-g733a5 From a49acea80de0a78b421319ad340d4bc5e84a4dfe Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Sun, 30 Dec 2018 18:57:31 +0100 Subject: Clarify const_let comment --- src/libsyntax/feature_gate.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 15cf4334154..a7b391f2d1a 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -685,7 +685,9 @@ declare_features! ( (accepted, min_const_unsafe_fn, "1.33.0", Some(55607), None), // `#[cfg_attr(predicate, multiple, attributes, here)]` (accepted, cfg_attr_multi, "1.33.0", Some(54881), None), - // Allows let bindings and destructuring in `const` functions and constants. + // Allows let bindings, assignments and destructuring in `const` functions and constants. + // As long as control flow is not implemented in const eval, `&&` and `||` may not be used + // at the same time as let bindings. (accepted, const_let, "1.33.0", Some(48821), None), ); -- cgit 1.4.1-3-g733a5 From 3dc08ed0688a07004693415155bae18c3e077992 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Sat, 12 Jan 2019 10:31:52 +0100 Subject: move const_let accepted gate to avoid future conflict. --- src/libsyntax/feature_gate.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index a7b391f2d1a..6c5c7defd43 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -683,12 +683,12 @@ declare_features! ( (accepted, repr_packed, "1.33.0", Some(33158), None), // Allows calling `const unsafe fn` inside `unsafe` blocks in `const fn` functions. (accepted, min_const_unsafe_fn, "1.33.0", Some(55607), None), - // `#[cfg_attr(predicate, multiple, attributes, here)]` - (accepted, cfg_attr_multi, "1.33.0", Some(54881), None), // Allows let bindings, assignments and destructuring in `const` functions and constants. // As long as control flow is not implemented in const eval, `&&` and `||` may not be used // at the same time as let bindings. (accepted, const_let, "1.33.0", Some(48821), None), + // `#[cfg_attr(predicate, multiple, attributes, here)]` + (accepted, cfg_attr_multi, "1.33.0", Some(54881), None), ); // If you change this, please modify `src/doc/unstable-book` as well. You must -- cgit 1.4.1-3-g733a5