]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_ast_passes/src/feature_gate.rs
Split slice part of feature(half_open_range_patterns) to [...]_in_slices
[rust.git] / compiler / rustc_ast_passes / src / feature_gate.rs
index 0017a28cf1b184bbab7f21a9ffa0ebf42a9b9519..0b033e9384ce0c2be6d4dd41f66a8978c39bf51f 100644 (file)
@@ -461,7 +461,7 @@ fn visit_pat(&mut self, pattern: &'a ast::Pat) {
                     if let PatKind::Range(Some(_), None, Spanned { .. }) = inner_pat.kind {
                         gate_feature_post!(
                             &self,
-                            half_open_range_patterns,
+                            half_open_range_patterns_in_slices,
                             pat.span,
                             "`X..` patterns in slices are experimental"
                         );
@@ -589,7 +589,10 @@ macro_rules! gate_all {
     gate_all!(generators, "yield syntax is experimental");
     gate_all!(raw_ref_op, "raw address of syntax is experimental");
     gate_all!(const_trait_impl, "const trait impls are experimental");
-    gate_all!(half_open_range_patterns, "half-open range patterns are unstable");
+    gate_all!(
+        half_open_range_patterns_in_slices,
+        "half-open range patterns in slices are unstable"
+    );
     gate_all!(inline_const, "inline-const is experimental");
     gate_all!(inline_const_pat, "inline-const in pattern position is experimental");
     gate_all!(associated_const_equality, "associated const equality is incomplete");