Commit Graph

11 Commits

Author SHA1 Message Date
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
Edwin Cheng
0405d758a5 Simplify TokenStream FromStr 2021-03-06 03:17:36 +08:00
vlad20012
a157f19bf5
Fix proc macro TokenStream::from_str token ids 2021-03-01 19:55:30 +03:00
Jonas Bushart
bd525c9d20 Add isize to the list of suffixed integers in typed_integer
The missing `isize` in `typed_integers` seems to just be an oversight.

Might fix: #7751
2021-02-22 14:48:56 +01:00
bstrie
3c922072ae Remove use of deprecated std::collections::Bound 2021-02-16 18:22:14 -05:00
Vincent Esche
21f8239ac8 Fixed typos in code comments 2021-01-09 15:41:29 +01:00
Edwin Cheng
1bd1830f50 Fix spacing in proc-macro tokens to_string 2020-12-31 13:36:19 +08:00
Jonas Schievink
d477c09c8a Avoid nesting Subtrees when parsing TokenStream 2020-12-09 14:58:46 +01:00
Laurențiu Nicola
3d169bd3f4 Add track_env_var to the proc macro server 2020-10-08 17:06:20 +03:00
Aleksey Kladov
2f45cfc415 Rename ra_mbe -> mbe 2020-08-13 10:36:04 +02:00
Pavan Kumar Sunkara
349e6c62ad Rename ra_proc_macro_srv -> proc_macro_srv 2020-08-13 03:18:19 +02:00