Skip to content

Commit

Permalink
fix incorrect assert
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-i-m committed May 8, 2019
1 parent 5db665b commit eb7d47c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libsyntax/ext/tt/transcribe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit eb7d47c

Please sign in to comment.