diff options
| author | kennytm <kennytm@gmail.com> | 2018-01-28 03:19:29 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2018-03-15 16:58:02 +0800 |
| commit | 92d1f8d8e4be62e6f4dc32bc57f9d44f53117ec9 (patch) | |
| tree | 61eeb58e84dcb4a8e85640fd50e1ad04e6c017ea /src/libsyntax | |
| parent | b5913f2e7695ad247078619bf4c6a6d3dc4dece5 (diff) | |
| download | rust-92d1f8d8e4be62e6f4dc32bc57f9d44f53117ec9.tar.gz rust-92d1f8d8e4be62e6f4dc32bc57f9d44f53117ec9.zip | |
Stabilize `inclusive_range_syntax` language feature.
Stabilize the syntax `a..=b` and `..=b`.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/diagnostic_list.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 10 |
2 files changed, 2 insertions, 12 deletions
diff --git a/src/libsyntax/diagnostic_list.rs b/src/libsyntax/diagnostic_list.rs index 549ef88afcc..1f87c1b94c5 100644 --- a/src/libsyntax/diagnostic_list.rs +++ b/src/libsyntax/diagnostic_list.rs @@ -218,8 +218,6 @@ An inclusive range was used with no end. Erroneous code example: ```compile_fail,E0586 -#![feature(inclusive_range_syntax)] - fn main() { let tmp = vec![0, 1, 2, 3, 4, 4, 3, 3, 2, 1]; let x = &tmp[1..=]; // error: inclusive range was used with no end @@ -239,8 +237,6 @@ fn main() { Or put an end to your inclusive range: ``` -#![feature(inclusive_range_syntax)] - fn main() { let tmp = vec![0, 1, 2, 3, 4, 4, 3, 3, 2, 1]; let x = &tmp[1..=3]; // ok! diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 91364fe6ed4..a415117b599 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -268,9 +268,6 @@ declare_features! ( // rustc internal (active, abi_vectorcall, "1.7.0", None, None), - // a..=b and ..=b - (active, inclusive_range_syntax, "1.7.0", Some(28237), None), - // X..Y patterns (active, exclusive_range_pattern, "1.11.0", Some(37854), None), @@ -554,6 +551,8 @@ declare_features! ( (accepted, match_beginning_vert, "1.25.0", Some(44101), None), // Nested groups in `use` (RFC 2128) (accepted, use_nested_groups, "1.25.0", Some(44494), None), + // a..=b and ..=b + (accepted, inclusive_range_syntax, "1.26.0", Some(28237), None), ); // If you change this, please modify src/doc/unstable-book as well. You must @@ -1592,11 +1591,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { gate_feature_post!(&self, type_ascription, e.span, "type ascription is experimental"); } - ast::ExprKind::Range(_, _, ast::RangeLimits::Closed) => { - gate_feature_post!(&self, inclusive_range_syntax, - e.span, - "inclusive range syntax is experimental"); - } ast::ExprKind::InPlace(..) => { gate_feature_post!(&self, placement_in_syntax, e.span, EXPLAIN_PLACEMENT_IN); } |
