3 ms·
Thanks! For the curious, more details here: https://blog.rust-lang.org/2019/04/11/Rust-1.34.0.html#custom-attributes-accept-arbitrary-token-streams https://blo
by int_19h 8y ago
Thanks! For the curious, more details here:
https://blog.rust-lang.org/2019/04/11/Rust-1.34.0.html#custom-attributes-accept-arbitrary-token-streams https://blog.rust-lang.org/2019/04/11/Rust-1.34.0.html#custo...
From tooling perspective, this isn't perfect, because there's still no guarantee that the token stream is a valid expression. So e.g. an IDE trying to highlight them or do a global rename refactor has to assume, which might not always be correct for token-based DSLs. It would be nice to have some metadata to distinguish those. Or perhaps there is an idiomatic way to express it in a contract on the macro itself, that tools could look at?
- steveklabnik 8y agoNot sure, to be honest.