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
Investigating further, The issue is due to the fact that I inlined the bounds for the type parameter. The problem is that it's not valid Rust syntax to include the bounds in the type instantiation part of the impl. See the second use of #struct_gen here:
Unfortunately there isn't an easy fix offered by the syn crate. The params field of https://docs.rs/syn/latest/syn/struct.Generics.html needs to be parsed manually to separate the type identifiers from the bounds.
Luckily, using a where clause in the struct definition instead of inline bounds gets past this problem, but it appears there is a problem onion.
But it still hits the rocks in the clap::Parser derive because the #[config] macro eats the attribute intended for clap. But that's a separate issue.
luketpeterson
changed the title
config proc macro doesn't support generic parametersconfig proc macro doesn't support generic parameters with inline bounds
Jun 20, 2023
The following code won't compile:
I get the following error:
The text was updated successfully, but these errors were encountered: