diff options
| author | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-01-02 15:45:48 -0800 |
|---|---|---|
| committer | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-01-09 16:46:14 -0800 |
| commit | 63e2e44eb94c375527ddc6438479a0dd10ed4310 (patch) | |
| tree | 28b74f617b875e8d8e8ca47d0781ab8a67850ea6 | |
| parent | 72b2bd55edbb1e63a930c5ddd08b25e4f9044786 (diff) | |
| download | rust-63e2e44eb94c375527ddc6438479a0dd10ed4310.tar.gz rust-63e2e44eb94c375527ddc6438479a0dd10ed4310.zip | |
Add `const_trait_impl` feature gate
| -rw-r--r-- | src/librustc_feature/active.rs | 4 | ||||
| -rw-r--r-- | src/librustc_span/symbol.rs | 1 | ||||
| -rw-r--r-- | src/libsyntax/feature_gate/check.rs | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/librustc_feature/active.rs b/src/librustc_feature/active.rs index 8cb1684491b..77ee9f40b6c 100644 --- a/src/librustc_feature/active.rs +++ b/src/librustc_feature/active.rs @@ -544,6 +544,9 @@ declare_features! ( /// 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), + // ------------------------------------------------------------------------- // feature-group-end: actual feature gates // ------------------------------------------------------------------------- @@ -559,4 +562,5 @@ pub const INCOMPLETE_FEATURES: &[Symbol] = &[ sym::or_patterns, sym::let_chains, sym::raw_dylib, + sym::const_trait_impl, ]; diff --git a/src/librustc_span/symbol.rs b/src/librustc_span/symbol.rs index 40abc8b2179..5ba45e0a673 100644 --- a/src/librustc_span/symbol.rs +++ b/src/librustc_span/symbol.rs @@ -219,6 +219,7 @@ symbols! { const_raw_ptr_deref, const_raw_ptr_to_usize_cast, const_transmute, + const_trait_impl, contents, context, convert, diff --git a/src/libsyntax/feature_gate/check.rs b/src/libsyntax/feature_gate/check.rs index 26545bfa61b..f5090bf1553 100644 --- a/src/libsyntax/feature_gate/check.rs +++ b/src/libsyntax/feature_gate/check.rs @@ -909,6 +909,7 @@ pub fn check_crate( gate_all!(or_patterns, "or-patterns syntax is experimental"); gate_all!(const_extern_fn, "`const extern fn` definitions are unstable"); gate_all!(raw_ref_op, "raw address of syntax is experimental"); + gate_all!(const_trait_impl, "const trait impls are experimental"); // All uses of `gate_all!` below this point were added in #65742, // and subsequently disabled (with the non-early gating readded). |
