Skip to content

Commit 664fe3a

Browse files
Add const_trait_bound_opt_out feature gate
1 parent c09e16d commit 664fe3a

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

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

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

0 commit comments

Comments
 (0)