dtolnay / quote

Rust quasi-quoting
Apache License 2.0
1.32k stars 90 forks source link

Consider removing invalid span workaround form `join_spans` #222

Closed mystor closed 2 years ago

mystor commented 2 years ago

In the internal join_spans function, there is some old code which filters out invalid tokens from the input stream by debug-printing the Span object, and inspecting the output.

https://github.com/dtolnay/quote/blob/7d5d36017b71a72d3bc6c4ab4f24fb372fb4f031/src/spanned.rs#L21-L32

Given that https://github.com/rust-lang/rust/issues/43081 appears to have been fixed for a bit over a year (https://github.com/rust-lang/rust/issues/43081#issuecomment-817290987), perhaps this code could be disabled on versions with the fix (appears to be rustc 1.53+)?