Skip to content

Commit a4d8033

Browse files
committed
Stabilize dotdoteq_in_patterns language feature.
Stabilize `match 2 { 1..=3 => {} }`.
1 parent 92d1f8d commit a4d8033

File tree

4 files changed

+3
-37
lines changed

4 files changed

+3
-37
lines changed

src/libsyntax/feature_gate.rs

+3-8
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use self::AttributeType::*;
2626
use self::AttributeGate::*;
2727

2828
use abi::Abi;
29-
use ast::{self, NodeId, PatKind, RangeEnd, RangeSyntax};
29+
use ast::{self, NodeId, PatKind, RangeEnd};
3030
use attr;
3131
use epoch::Epoch;
3232
use codemap::Spanned;
@@ -399,9 +399,6 @@ declare_features! (
399399
// allow `'_` placeholder lifetimes
400400
(active, underscore_lifetimes, "1.22.0", Some(44524), None),
401401

402-
// allow `..=` in patterns (RFC 1192)
403-
(active, dotdoteq_in_patterns, "1.22.0", Some(28237), None),
404-
405402
// Default match binding modes (RFC 2005)
406403
(active, match_default_bindings, "1.22.0", Some(42640), None),
407404

@@ -553,6 +550,8 @@ declare_features! (
553550
(accepted, use_nested_groups, "1.25.0", Some(44494), None),
554551
// a..=b and ..=b
555552
(accepted, inclusive_range_syntax, "1.26.0", Some(28237), None),
553+
// allow `..=` in patterns (RFC 1192)
554+
(accepted, dotdoteq_in_patterns, "1.26.0", Some(28237), None),
556555
);
557556

558557
// If you change this, please modify src/doc/unstable-book as well. You must
@@ -1652,10 +1651,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
16521651
gate_feature_post!(&self, exclusive_range_pattern, pattern.span,
16531652
"exclusive range pattern syntax is experimental");
16541653
}
1655-
PatKind::Range(_, _, RangeEnd::Included(RangeSyntax::DotDotEq)) => {
1656-
gate_feature_post!(&self, dotdoteq_in_patterns, pattern.span,
1657-
"`..=` syntax in patterns is experimental");
1658-
}
16591654
PatKind::Paren(..) => {
16601655
gate_feature_post!(&self, pattern_parentheses, pattern.span,
16611656
"parentheses in patterns are unstable");

src/test/run-pass/inc-range-pat.rs

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// except according to those terms.
1010

1111
// Test old and new syntax for inclusive range patterns.
12-
#![feature(dotdoteq_in_patterns)]
13-
1412

1513
fn main() {
1614
assert!(match 42 { 0 ... 100 => true, _ => false });

src/test/ui/feature-gate-dotdoteq_in_patterns.rs

-16
This file was deleted.

src/test/ui/feature-gate-dotdoteq_in_patterns.stderr

-11
This file was deleted.

0 commit comments

Comments
 (0)