|
|
|
|
|
by ibraheemdev
1987 days ago
|
|
One problem with the macros approach is that you get really hard to understand error messages. For example, if a user wrote a method where one of the arguments did not implement ToPolarValue, they would get the following error: fn blah(blah: Blah)
^^^^^^^^^^^^^^^^^^^ the trait bound Method<_, _> is not satisfied
As opposed to something like this with variadic generics: fn blah(blah: Blah)
^^^^ the trait bound ToPolarValue is not satisfied
|
|
Sadly it hasn't been worked on in years.
[1] https://github.com/rust-lang/rust/issues/54140