diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-10-31 18:30:25 +0200 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-10-31 19:08:11 +0200 |
| commit | 4c48355c69148c49d1becc26dcc6439650a35589 (patch) | |
| tree | 24d6a09283b97e490807b4262900f3c1ab15bf32 /src/libsyntax | |
| parent | 8645ac4218e2c503c616ebcfccf034c07a94f405 (diff) | |
| download | rust-4c48355c69148c49d1becc26dcc6439650a35589.tar.gz rust-4c48355c69148c49d1becc26dcc6439650a35589.zip | |
Revert "pre-expansion gate exclusive_range_pattern"
This reverts commit 665a876e307933c6480a6c55a3e38e88937aff2c.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate/check.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libsyntax/feature_gate/check.rs b/src/libsyntax/feature_gate/check.rs index 52fb4761527..7c5b75387d2 100644 --- a/src/libsyntax/feature_gate/check.rs +++ b/src/libsyntax/feature_gate/check.rs @@ -3,8 +3,9 @@ use super::accepted::ACCEPTED_FEATURES; use super::removed::{REMOVED_FEATURES, STABLE_REMOVED_FEATURES}; use super::builtin_attrs::{AttributeGate, BUILTIN_ATTRIBUTE_MAP}; -use crate::ast::{self, NodeId, PatKind, VariantData}; +use crate::ast::{self, NodeId, PatKind, RangeEnd, VariantData}; use crate::attr::{self, check_builtin_attribute}; +use crate::source_map::Spanned; use crate::edition::{ALL_EDITIONS, Edition}; use crate::visit::{self, FnKind, Visitor}; use crate::parse::token; @@ -551,6 +552,10 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { } } } + PatKind::Range(_, _, Spanned { node: RangeEnd::Excluded, .. }) => { + gate_feature_post!(&self, exclusive_range_pattern, pattern.span, + "exclusive range pattern syntax is experimental"); + } _ => {} } visit::walk_pat(self, pattern) |
