diff options
Diffstat (limited to 'compiler/rustc_feature')
| -rw-r--r-- | compiler/rustc_feature/src/accepted.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_feature/src/active.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_feature/src/removed.rs | 3 |
3 files changed, 8 insertions, 5 deletions
diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs index 18294dfad24..725f8b8763a 100644 --- a/compiler/rustc_feature/src/accepted.rs +++ b/compiler/rustc_feature/src/accepted.rs @@ -273,7 +273,7 @@ declare_features! ( /// Allows patterns with concurrent by-move and by-ref bindings. /// For example, you can write `Foo(a, ref b)` where `a` is by-move and `b` is by-ref. (accepted, move_ref_pattern, "1.49.0", Some(68354), None), - /// The smallest useful subset of `const_generics`. + /// The smallest useful subset of const generics. (accepted, min_const_generics, "1.51.0", Some(74878), None), /// The `unsafe_op_in_unsafe_fn` lint (allowed by default): no longer treat an unsafe function as an unsafe block. (accepted, unsafe_block_in_unsafe_fn, "1.52.0", Some(71668), None), diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index 222b17615e2..e2c88835f52 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -71,7 +71,7 @@ macro_rules! declare_features { } pub fn unordered_const_ty_params(&self) -> bool { - self.const_generics || self.const_generics_defaults + self.const_generics_defaults } /// Some features are known to be incomplete and using them is likely to have @@ -453,9 +453,6 @@ declare_features! ( /// Allows using `#[ffi_returns_twice]` on foreign functions. (active, ffi_returns_twice, "1.34.0", Some(58314), None), - /// Allows const generic types (e.g. `struct Foo<const N: usize>(...);`). - (incomplete, const_generics, "1.34.0", Some(44580), None), - /// Allows using `#[optimize(X)]`. (active, optimize_attribute, "1.34.0", Some(54882), None), @@ -676,6 +673,9 @@ declare_features! ( /// Allows non-trivial generic constants which have to have wfness manually propagated to callers (incomplete, generic_const_exprs, "1.56.0", Some(76560), None), + /// Allows additional const parameter types, such as `&'static str` or user defined types + (incomplete, const_param_types, "1.56.0", Some(44580), None), + // ------------------------------------------------------------------------- // feature-group-end: actual feature gates // ------------------------------------------------------------------------- diff --git a/compiler/rustc_feature/src/removed.rs b/compiler/rustc_feature/src/removed.rs index 326daf21e40..dd17b8ab22b 100644 --- a/compiler/rustc_feature/src/removed.rs +++ b/compiler/rustc_feature/src/removed.rs @@ -102,6 +102,9 @@ declare_features! ( (removed, extern_in_paths, "1.33.0", Some(55600), None, Some("subsumed by `::foo::bar` paths")), (removed, quote, "1.33.0", Some(29601), None, None), + /// Allows const generic types (e.g. `struct Foo<const N: usize>(...);`). + (removed, const_generics, "1.34.0", Some(44580), None, + Some("removed in favor of `#![feature(const_param_types]` and `#![feature(generic_const_exprs)]`")), /// Allows `[x; N]` where `x` is a constant (RFC 2203). (removed, const_in_array_repeat_expressions, "1.37.0", Some(49147), None, Some("removed due to causing promotable bugs")), |
