about summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-09-27 16:04:31 +0000
committerbors <bors@rust-lang.org>2017-09-27 16:04:31 +0000
commit0e6f4cf51cd3b799fb057956f8e733d16605d09b (patch)
tree56ff7787ca8fa8b1282782c5b14546d7a27870ef /src/libsyntax/ext
parent1fd3a42c624faf91e9402942419ec409699fb94a (diff)
parent5102309b1ff63660309dead2e39ff9a9b554799a (diff)
downloadrust-0e6f4cf51cd3b799fb057956f8e733d16605d09b.tar.gz
rust-0e6f4cf51cd3b799fb057956f8e733d16605d09b.zip
Auto merge of #44709 - Badel2:inclusive-range-dotdoteq, r=petrochenkov
Initial support for `..=` syntax

#28237

This PR adds `..=` as a synonym for `...` in patterns and expressions.
Since `...` in expressions was never stable, we now issue a warning.

cc @durka
r? @aturon
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/quote.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs
index c3f3a59c302..bd8c9a0ed40 100644
--- a/src/libsyntax/ext/quote.rs
+++ b/src/libsyntax/ext/quote.rs
@@ -686,7 +686,9 @@ fn expr_mk_token(cx: &ExtCtxt, sp: Span, tok: &token::Token) -> P<ast::Expr> {
         token::At           => "At",
         token::Dot          => "Dot",
         token::DotDot       => "DotDot",
+        token::DotEq        => "DotEq",
         token::DotDotDot    => "DotDotDot",
+        token::DotDotEq     => "DotDotEq",
         token::Comma        => "Comma",
         token::Semi         => "Semi",
         token::Colon        => "Colon",