about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-08-07 16:55:43 +0800
committerGitHub <noreply@github.com>2018-08-07 16:55:43 +0800
commitc1220610efc3e8663b16709a89cfd75a05510a20 (patch)
tree8853137a16895bd349978426df52402473c6e39f /src/libsyntax
parent3385cae74abea42194f3b566ce9fc28c30df29a4 (diff)
parent3d44da65cd91a65603676bb2f2bc6b9bdc5775bf (diff)
downloadrust-c1220610efc3e8663b16709a89cfd75a05510a20.tar.gz
rust-c1220610efc3e8663b16709a89cfd75a05510a20.zip
Rollup merge of #53093 - 0e4ef622:issue-52169-fix, r=petrochenkov
Enable macros to pass $:literal to another macro

Fixes #52169.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/parse/token.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index c449cc0a652..1d0c6b5317a 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -302,6 +302,10 @@ impl Token {
             BinOp(Minus) => true,
             Ident(ident, false) if ident.name == keywords::True.name() => true,
             Ident(ident, false) if ident.name == keywords::False.name() => true,
+            Interpolated(ref nt) => match nt.0 {
+                NtLiteral(..) => true,
+                _             => false,
+            },
             _            => false,
         }
     }