diff options
| author | kennytm <kennytm@gmail.com> | 2018-01-28 03:29:00 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2018-03-15 16:58:02 +0800 |
| commit | a4d80336c96d7f47b0ef025fa141a9c96abcafbd (patch) | |
| tree | 92ba828c6846d7eedd83656cb03f441dfcf58897 /src/libsyntax | |
| parent | 92d1f8d8e4be62e6f4dc32bc57f9d44f53117ec9 (diff) | |
| download | rust-a4d80336c96d7f47b0ef025fa141a9c96abcafbd.tar.gz rust-a4d80336c96d7f47b0ef025fa141a9c96abcafbd.zip | |
Stabilize `dotdoteq_in_patterns` language feature.
Stabilize `match 2 { 1..=3 => {} }`.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index a415117b599..51fa1489599 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -26,7 +26,7 @@ use self::AttributeType::*; use self::AttributeGate::*; use abi::Abi; -use ast::{self, NodeId, PatKind, RangeEnd, RangeSyntax}; +use ast::{self, NodeId, PatKind, RangeEnd}; use attr; use epoch::Epoch; use codemap::Spanned; @@ -399,9 +399,6 @@ declare_features! ( // allow `'_` placeholder lifetimes (active, underscore_lifetimes, "1.22.0", Some(44524), None), - // allow `..=` in patterns (RFC 1192) - (active, dotdoteq_in_patterns, "1.22.0", Some(28237), None), - // Default match binding modes (RFC 2005) (active, match_default_bindings, "1.22.0", Some(42640), None), @@ -553,6 +550,8 @@ declare_features! ( (accepted, use_nested_groups, "1.25.0", Some(44494), None), // a..=b and ..=b (accepted, inclusive_range_syntax, "1.26.0", Some(28237), None), + // allow `..=` in patterns (RFC 1192) + (accepted, dotdoteq_in_patterns, "1.26.0", Some(28237), None), ); // 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> { gate_feature_post!(&self, exclusive_range_pattern, pattern.span, "exclusive range pattern syntax is experimental"); } - PatKind::Range(_, _, RangeEnd::Included(RangeSyntax::DotDotEq)) => { - gate_feature_post!(&self, dotdoteq_in_patterns, pattern.span, - "`..=` syntax in patterns is experimental"); - } PatKind::Paren(..) => { gate_feature_post!(&self, pattern_parentheses, pattern.span, "parentheses in patterns are unstable"); |
