6783: Avoid nesting Subtrees when parsing TokenStream r=jonas-schievink a=jonas-schievink

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/6744

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
This commit is contained in:
bors[bot] 2020-12-09 13:59:39 +00:00 committed by GitHub
commit 42be522c80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 })
}
}