about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorSantiago Pastorino <spastorino@gmail.com>2020-09-21 16:10:31 -0300
committerSantiago Pastorino <spastorino@gmail.com>2020-10-16 15:13:28 -0300
commit3c4ad5508242bd560d095f1380bb8d739a0cbba2 (patch)
treeac04b76b49ee7bcdbed0737b4267b7a5ecb78633 /compiler
parent6999ff33c9234b04cf5273497546b6a878bdb349 (diff)
downloadrust-3c4ad5508242bd560d095f1380bb8d739a0cbba2.tar.gz
rust-3c4ad5508242bd560d095f1380bb8d739a0cbba2.zip
Add inline_const feature flag
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_ast_passes/src/feature_gate.rs1
-rw-r--r--compiler/rustc_feature/src/active.rs3
-rw-r--r--compiler/rustc_span/src/symbol.rs1
3 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_ast_passes/src/feature_gate.rs b/compiler/rustc_ast_passes/src/feature_gate.rs
index 00d3db73766..f2008449767 100644
--- a/compiler/rustc_ast_passes/src/feature_gate.rs
+++ b/compiler/rustc_ast_passes/src/feature_gate.rs
@@ -629,6 +629,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session) {
     gate_all!(const_trait_bound_opt_out, "`?const` on trait bounds is experimental");
     gate_all!(const_trait_impl, "const trait impls are experimental");
     gate_all!(half_open_range_patterns, "half-open range patterns are unstable");
+    gate_all!(inline_const, "inline-const is experimental");
 
     // All uses of `gate_all!` below this point were added in #65742,
     // and subsequently disabled (with the non-early gating readded).
diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs
index 7fbd070a609..9a70fa4d589 100644
--- a/compiler/rustc_feature/src/active.rs
+++ b/compiler/rustc_feature/src/active.rs
@@ -598,6 +598,9 @@ declare_features! (
     /// Allows `#[instruction_set(_)]` attribute
     (active, isa_attribute, "1.48.0", Some(74727), None),
 
+    /// Allow anonymous constants from an inline `const` block
+    (active, inline_const, "1.49.0", Some(76001), None),
+
     // -------------------------------------------------------------------------
     // feature-group-end: actual feature gates
     // -------------------------------------------------------------------------
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs
index 28fef65da07..9cf530d57c0 100644
--- a/compiler/rustc_span/src/symbol.rs
+++ b/compiler/rustc_span/src/symbol.rs
@@ -593,6 +593,7 @@ symbols! {
         infer_static_outlives_requirements,
         inlateout,
         inline,
+        inline_const,
         inout,
         instruction_set,
         intel,