The Ident::new_raw method has been stable since rustc 1.47.0 (https://doc.rust-lang.org/nightly/proc_macro/struct.Ident.html#method.new_raw). The logic for pushing raw identifiers into a TokenStream still uses TokenStream::from_str however, and could be updated to call this new_raw on versions where it's available.
The
Ident::new_raw
method has been stable since rustc 1.47.0 (https://doc.rust-lang.org/nightly/proc_macro/struct.Ident.html#method.new_raw). The logic for pushing raw identifiers into aTokenStream
still usesTokenStream::from_str
however, and could be updated to call thisnew_raw
on versions where it's available.https://github.com/dtolnay/quote/blob/7d5d36017b71a72d3bc6c4ab4f24fb372fb4f031/src/runtime.rs#L192-L202
https://github.com/dtolnay/quote/blob/7d5d36017b71a72d3bc6c4ab4f24fb372fb4f031/src/runtime.rs#L204-L214
https://github.com/dtolnay/quote/blob/7d5d36017b71a72d3bc6c4ab4f24fb372fb4f031/src/runtime.rs#L322-L335