about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ext/tt/transcribe.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs
index 3a40e8403cc..0cefcf1ce03 100644
--- a/src/libsyntax/ext/tt/transcribe.rs
+++ b/src/libsyntax/ext/tt/transcribe.rs
@@ -71,7 +71,10 @@ pub fn transcribe(
     interp: &FxHashMap<Ident, Rc<NamedMatch>>,
     src: Vec<quoted::TokenTree>,
 ) -> TokenStream {
-    assert!(src.len() > 0);
+    // Nothing for us to transcribe...
+    if src.is_empty() {
+        return TokenStream::empty();
+    }
 
     // We descend into the RHS (`src`), expanding things as we go. This stack contains the things
     // we have yet to expand/are still expanding. We start the stack off with the whole RHS.