Skip to content

Commit 6fc4158

Browse files
Add const_trait_bound_opt_out feature gate
1 parent 63e2e44 commit 6fc4158

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
@@ -547,6 +547,9 @@ declare_features! (
547547
/// Allows `impl const Trait for T` syntax.
548548
(active, const_trait_impl, "1.42.0", Some(67792), None),
549549

550+
/// Allows `T: ?const Trait` syntax in bounds.
551+
(active, const_trait_bound_opt_out, "1.42.0", Some(67794), None),
552+
550553
// -------------------------------------------------------------------------
551554
// feature-group-end: actual feature gates
552555
// -------------------------------------------------------------------------
@@ -563,4 +566,5 @@ pub const INCOMPLETE_FEATURES: &[Symbol] = &[
563566
sym::let_chains,
564567
sym::raw_dylib,
565568
sym::const_trait_impl,
569+
sym::const_trait_bound_opt_out,
566570
];

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_bound_opt_out,
222223
const_trait_impl,
223224
contents,
224225
context,

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_bound_opt_out, "`?const` on trait bounds is experimental");
912913
gate_all!(const_trait_impl, "const trait impls are experimental");
913914

914915
// All uses of `gate_all!` below this point were added in #65742,

0 commit comments

Comments
 (0)