mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
![bors[bot]](/assets/img/avatar_default.png)
7827: Fix proc macro TokenStream::from_str token ids r=vlad20012 a=vlad20012 To be honest, I don't know what it changes from a user perspective. Internally, this fixes spans (token ids) of a `TokenStream` parsed from a string: ```rust #[proc_macro_derive(FooDerive)] pub fn foo_derive(item: TokenStream) -> TokenStream { "fn foo() {}".parse().unwrap() } ``` Previously, `TokenStream` was constructed from tokens with incremental ids (that conflicted with call-site tokens). Now they are `-1`. Co-authored-by: vlad20012 <beskvlad@gmail.com>