Skip to content

Commit c09e16d

Browse files
Add const_trait_impl feature gate
1 parent 760ce94 commit c09e16d

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
@@ -220,6 +220,7 @@ symbols! {
220220
const_raw_ptr_deref,
221221
const_raw_ptr_to_usize_cast,
222222
const_transmute,
223+
const_trait_impl,
223224
contents,
224225
context,
225226
convert,

src/libsyntax/feature_gate/check.rs

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

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

0 commit comments

Comments
 (0)