SkylerLipthay / interpolate_idents

Useable macro identifier concatenation plugin for Rust (deprecated)
MIT License
42 stars 10 forks source link

Stable compatibility #6

Closed jnicholls closed 5 years ago

jnicholls commented 8 years ago

Like other crates have done (e.g. serde_codegen), perhaps provide the ability for someone to instead register the plugin and expand code in build.rs. It would only take a feature flag cfg checks sprinkled around to cut out the stable incompatible parts of this.

ghost commented 8 years ago

:+1:

farodin91 commented 6 years ago

I think this project can use proc_marco instead of a compiler plugin. https://doc.rust-lang.org/unstable-book/language-features/proc-macro.html

SkylerLipthay commented 6 years ago

I haven't been following the proc_macro development but I would be thrilled to use it instead of the current compiler plugin technique. That said, proc_macro seems to be currently unstable.

farodin91 commented 6 years ago

Currently, proc_macro are much more stable and have great tooling. Also, proc_macro are currently in the final comment phase https://github.com/rust-lang/rust/issues/38356.

bspeice commented 6 years ago

In case anyone comes here wondering if Rust 1.30 proc_macro replaces this, the answer is "no." You're still not allowed have ! in function names, though there's a potential now for building the entire function as a proc_macro.

gnzlbg commented 5 years ago

See #45 - TL;DR: use the paste crate, it uses a proc macro, and works on stable.