Skip to content

Commit 63e2e44

Browse files
Add const_trait_impl feature gate
1 parent 72b2bd5 commit 63e2e44

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/librustc_feature/active.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,9 @@ declare_features! (
544544
/// For example, you can write `x @ Some(y)`.
545545
(active, bindings_after_at, "1.41.0", Some(65490), None),
546546

547+
/// Allows `impl const Trait for T` syntax.
548+
(active, const_trait_impl, "1.42.0", Some(67792), None),
549+
547550
// -------------------------------------------------------------------------
548551
// feature-group-end: actual feature gates
549552
// -------------------------------------------------------------------------
@@ -559,4 +562,5 @@ pub const INCOMPLETE_FEATURES: &[Symbol] = &[
559562
sym::or_patterns,
560563
sym::let_chains,
561564
sym::raw_dylib,
565+
sym::const_trait_impl,
562566
];

src/librustc_span/symbol.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ symbols! {
219219
const_raw_ptr_deref,
220220
const_raw_ptr_to_usize_cast,
221221
const_transmute,
222+
const_trait_impl,
222223
contents,
223224
context,
224225
convert,

src/libsyntax/feature_gate/check.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,7 @@ pub fn check_crate(
909909
gate_all!(or_patterns, "or-patterns syntax is experimental");
910910
gate_all!(const_extern_fn, "`const extern fn` definitions are unstable");
911911
gate_all!(raw_ref_op, "raw address of syntax is experimental");
912+
gate_all!(const_trait_impl, "const trait impls are experimental");
912913

913914
// All uses of `gate_all!` below this point were added in #65742,
914915
// and subsequently disabled (with the non-early gating readded).

0 commit comments

Comments
 (0)