rust/crates/proc_macro_srv/src
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
..
proc_macro Fixed typos in code comments 2021-01-09 15:41:29 +01:00
tests Fix test 2021-03-06 03:30:22 +08:00
cli.rs Rename ra_proc_macro -> proc_macro_api 2020-08-13 12:39:27 +02:00
dylib.rs libloading 0.7 2021-02-11 10:07:49 -05:00
lib.rs Pass crate environment to proc macros 2020-12-27 15:29:47 +01:00
rustc_server.rs Fix TokenStream::from_str for input consisting of a single Group 2021-03-06 09:48:08 -07:00