and it only works for structs, not enums
A few pointers that might be helpful: - https://astexplorer.net/ can be used to explore Rust - the syn + quote + proc-macro2 crates are generally useful (and usually require flags to be turned on to be useful!) - if things end up looking wild, that's okay:https://github.com/yoshuawuyts/context-attribute/blob/master/src/lib.rs#L108-L116 …
-
-
Oh also, proc macro crates need to be marked as such in Cargo.toml, can only export proc macros, and everything has to live in a single file. And re-exporting proc macros from another crate will always look like "re-export foo from bar" even if you use `#[doc(inline)]`.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.