From eb7d47cba90ac716c84fe720418e58c6eb84ac4e Mon Sep 17 00:00:00 2001 From: Mark Mansi Date: Wed, 8 May 2019 13:34:23 -0500 Subject: fix incorrect assert --- src/libsyntax/ext/tt/transcribe.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/libsyntax') 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>, src: Vec, ) -> 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. -- cgit 1.4.1-3-g733a5