rust/crates/proc_macro_srv
Kevin Mehall 632fa8ef4a Fix TokenStream::from_str for input consisting of a single Group
TokenStream holds a `tt::Subtree` but assumes its `delimiter` is always
`None`. In particular, the iterator implementation iterates over the
inner `token_trees` and ignores the `delimiter`.

However, `TokenStream::from_str` violated this assumption when the input
consists of a single Group by producing a Subtree with an outer
delimiter, which was ignored as seen by a procedural macro.

In this case, wrap an extra level of Subtree around it.

Fixes #7810
Fixes #7875
2021-03-06 09:48:08 -07:00
..
src Fix TokenStream::from_str for input consisting of a single Group 2021-03-06 09:48:08 -07:00
Cargo.toml Bump cargo_metadata 2021-03-02 14:27:29 +02:00