From 12ac49afc9e1c33fe94f01dfca9efda4d7fed0b2 Mon Sep 17 00:00:00 2001 From: Christian Poveda Date: Sun, 17 Nov 2019 18:43:26 -0500 Subject: [PATCH] Add feature gate for &mut in const fns --- 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 16d8ada9f24c..706e10243651 100644 --- a/src/librustc_feature/active.rs +++ b/src/librustc_feature/active.rs @@ -527,6 +527,9 @@ declare_features! ( /// Allows the use of `#[cfg(sanitize = "option")]`; set when -Zsanitizer is used. (active, cfg_sanitize, "1.41.0", Some(39699), None), + /// Allows using `&mut` in constant functions. + (active, const_fn_mut_refs, "1.41.0", None, None), + // ------------------------------------------------------------------------- // feature-group-end: actual feature gates // ------------------------------------------------------------------------- diff --git a/src/libsyntax_pos/symbol.rs b/src/libsyntax_pos/symbol.rs index 3059b0596910..c98063275dd3 100644 --- a/src/libsyntax_pos/symbol.rs +++ b/src/libsyntax_pos/symbol.rs @@ -203,6 +203,7 @@ symbols! { const_constructor, const_extern_fn, const_fn, + const_fn_mut_refs, const_fn_union, const_generics, const_if_match,