]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_feature/active.rs
Auto merge of #67076 - mbrubeck:condvar, r=dtolnay
[rust.git] / src / librustc_feature / active.rs
index 06dbc8faf1dabd813dc74fc8bae345c441075d95..319cd88f24586e4d174264682a8d4d88bafd4001 100644 (file)
@@ -1,10 +1,10 @@
 //! List of the active feature gates.
 
-use super::{State, Feature};
+use super::{Feature, State};
 
-use syntax_pos::edition::Edition;
-use syntax_pos::Span;
-use syntax_pos::symbol::{Symbol, sym};
+use rustc_span::edition::Edition;
+use rustc_span::symbol::{sym, Symbol};
+use rustc_span::Span;
 
 macro_rules! set {
     ($field: ident) => {{
@@ -12,7 +12,7 @@ fn f(features: &mut Features, _: Span) {
             features.$field = true;
         }
         f as fn(&mut Features, Span)
-    }}
+    }};
 }
 
 macro_rules! declare_features {
@@ -72,7 +72,7 @@ impl Feature {
     pub fn set(&self, features: &mut Features, span: Span) {
         match self.state {
             State::Active { set } => set(features, span),
-            _ => panic!("called `set` on feature `{}` which is not `active`", self.name)
+            _ => panic!("called `set` on feature `{}` which is not `active`", self.name),
         }
     }
 }
@@ -91,6 +91,7 @@ pub fn set(&self, features: &mut Features, span: Span) {
 // N.B., `tools/tidy/src/features.rs` parses this information directly out of the
 // source, so take care when modifying it.
 
+#[rustfmt::skip]
 declare_features! (
     // -------------------------------------------------------------------------
     // feature-group-start: internal feature gates
@@ -191,9 +192,6 @@ pub fn set(&self, features: &mut Features, span: Span) {
     /// Allows using the `unadjusted` ABI; perma-unstable.
     (active, abi_unadjusted, "1.16.0", None, None),
 
-    /// Allows identifying crates that contain sanitizer runtimes.
-    (active, sanitizer_runtime, "1.17.0", None, None),
-
     /// Used to identify crates that contain the profiler runtime.
     (active, profiler_runtime, "1.18.0", None, None),
 
@@ -533,6 +531,9 @@ pub fn set(&self, features: &mut Features, span: Span) {
     /// Allows the use of `#[cfg(sanitize = "option")]`; set when -Zsanitizer is used.
     (active, cfg_sanitize, "1.41.0", Some(39699), None),
 
+    /// Allows using `..X`, `..=X`, `...X`, and `X..` as a pattern.
+    (active, half_open_range_patterns, "1.41.0", Some(67264), None),
+
     /// Allows using `&mut` in constant functions.
     (active, const_mut_refs, "1.41.0", Some(57349), None),
 
@@ -543,6 +544,12 @@ pub fn set(&self, features: &mut Features, span: Span) {
     /// For example, you can write `x @ Some(y)`.
     (active, bindings_after_at, "1.41.0", Some(65490), None),
 
+    /// Allows `impl const Trait for T` syntax.
+    (active, const_trait_impl, "1.42.0", Some(67792), None),
+
+    /// Allows `T: ?const Trait` syntax in bounds.
+    (active, const_trait_bound_opt_out, "1.42.0", Some(67794), None),
+
     // -------------------------------------------------------------------------
     // feature-group-end: actual feature gates
     // -------------------------------------------------------------------------
@@ -558,5 +565,6 @@ pub fn set(&self, features: &mut Features, span: Span) {
     sym::or_patterns,
     sym::let_chains,
     sym::raw_dylib,
-    sym::bindings_after_at,
+    sym::const_trait_impl,
+    sym::const_trait_bound_opt_out,
 ];