Avoid nesting Subtrees when parsing TokenStream

This commit is contained in:
Jonas Schievink 2020-12-09 14:58:46 +01:00
parent ef989880ff
commit d477c09c8a

View file

@ -184,8 +184,7 @@ pub mod token_stream {
let (subtree, _token_map) =
mbe::parse_to_token_tree(src).ok_or("Failed to parse from mbe")?;
let tt: tt::TokenTree = subtree.into();
Ok(tt.into())
Ok(TokenStream { subtree })
}
}