You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current solution works fine but is "a little" opaque and wastes the Rust compiler's time building a state machine using text substitution.
Problems replacing it are are:
Either
Currently, Rust does not support #[derive] on mod, only on struct and enum.
Or
Currently, Rust does not support implementing traits on individual enum variants.
One or the other would be required, or a horrible workaround (make the derive macro go on each struct and automatically collect stuff for the new enums, then emit that WHEN?).
Also,
It's not allowed to do this (twice): mod a { } mod a { }.
The text was updated successfully, but these errors were encountered:
It's kinda silly that we implement that outselves, as a macro_rules macro no less. But previous attempts using enum dispatch crates didn't work.
It would be nicer to have a derive macro or something.
What this is supposed to do is if you have this
then it should add this:
The current solution works fine but is "a little" opaque and wastes the Rust compiler's time building a state machine using text substitution.
Problems replacing it are are:
Either
#[derive]
onmod
, only onstruct
andenum
.Or
One or the other would be required, or a horrible workaround (make the derive macro go on each struct and automatically collect stuff for the new enums, then emit that WHEN?).
Also,
mod a { } mod a { }
.The text was updated successfully, but these errors were encountered: