4 ms·
Man, I did a bunch of work getting this whole extra crate just for one proc macro working to extract nested function ASTs from rust files, and on the 2nd day o
by bionhoward 3y ago
Man, I did a bunch of work getting this whole extra crate just for one proc macro working to extract nested function ASTs from rust files,
and on the 2nd day of work after everything finally worked, it complained because I wanted to return the AST instead of a token stream.
Joke’s on me because I didn’t know you have to use proc macros to transform code and I wound up just rewriting it as a function. Hopefully that doesn’t screw up what I want to do, which is basically compile time correctness checking, but it probably will…
Feels like every time I try to make compile time functionality in rust, I wind up getting sucked into endless type-level shenanigans, and it works, as long as you can tolerate the error messages being nigh unreadable.
WTB “comptime” Rust