4 ms·
I have a crate with a "perfect" derive macro that generates where clauses from the fields instead of putting them on the generic parameters. It is nice when it
by samsartor 1y ago
I have a crate with a "perfect" derive macro that generates where clauses from the fields instead of putting them on the generic parameters. It is nice when it works, but yah cyclical trait matching is still a real problem. I wound up needing an attribute to manually override the bounds whenever they blow up: https://docs.rs/inpt/latest/inpt/#bounds https://docs.rs/inpt/latest/inpt/#bounds
- mmastrac 1y agoI did a similar thing for derive-io. It greatly improved the ergonomics of the macro. https://docs.rs/derive-io/latest/derive_io/ https://docs.rs/derive-io/latest/derive_io/ Being able to handle directly recursive type bounds would be an awesome improvement to the compiler, IMO.