@@ -559,6 +559,9 @@ declare_features! (
559
559
// Allows `impl Trait` to be used inside type aliases (RFC 2515).
560
560
( active, type_alias_impl_trait, "1.38.0" , Some ( 63063 ) , None ) ,
561
561
562
+ // Allows the use of or-patterns, e.g. `0 | 1`.
563
+ ( active, or_patterns, "1.38.0" , Some ( 54883 ) , None ) ,
564
+
562
565
// -------------------------------------------------------------------------
563
566
// feature-group-end: actual feature gates
564
567
// -------------------------------------------------------------------------
@@ -571,6 +574,7 @@ pub const INCOMPLETE_FEATURES: &[Symbol] = &[
571
574
sym:: impl_trait_in_bindings,
572
575
sym:: generic_associated_types,
573
576
sym:: const_generics,
577
+ sym:: or_patterns,
574
578
sym:: let_chains,
575
579
] ;
576
580
@@ -2443,6 +2447,7 @@ pub fn check_crate(krate: &ast::Crate,
2443
2447
gate_all ! ( let_chains_spans, let_chains, "`let` expressions in this position are experimental" ) ;
2444
2448
gate_all ! ( async_closure_spans, async_closure, "async closures are unstable" ) ;
2445
2449
gate_all ! ( yield_spans, generators, "yield syntax is experimental" ) ;
2450
+ gate_all ! ( or_pattern_spans, or_patterns, "or-patterns syntax is experimental" ) ;
2446
2451
2447
2452
let visitor = & mut PostExpansionVisitor {
2448
2453
context : & ctx,
0 commit comments