Stabilize half_open_range_patterns
This commit is contained in:
parent
c084c26397
commit
5ae73634dc
43 changed files with 258 additions and 398 deletions
|
@ -777,7 +777,6 @@ impl<'a> Parser<'a> {
|
|||
/// expression syntax `...expr` for splatting in expressions.
|
||||
fn parse_pat_range_to(&mut self, mut re: Spanned<RangeEnd>) -> PResult<'a, PatKind> {
|
||||
let end = self.parse_pat_range_end()?;
|
||||
self.sess.gated_spans.gate(sym::half_open_range_patterns, re.span.to(self.prev_token.span));
|
||||
if let RangeEnd::Included(ref mut syn @ RangeSyntax::DotDotDot) = &mut re.node {
|
||||
*syn = RangeSyntax::DotDotEq;
|
||||
self.struct_span_err(re.span, "range-to patterns with `...` are not allowed")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue