twelf icon indicating copy to clipboard operation
twelf copied to clipboard

`config` proc macro doesn't support generic parameters with inline bounds

Open luketpeterson opened this issue 1 year ago • 2 comments

The following code won't compile:

#[config]
#[derive(clap::Parser, Debug, Default)]
pub struct FrameworkConfig<AppArgsT: clap::Args + std::fmt::Debug + Default + DeserializeOwned + Serialize> {

    #[command(flatten)]
    #[serde(skip)]
    pub app_args: AppArgsT,

    #[serde(rename = "scratchPath")]
    pub scratch_path: Option<PathBuf>,
}

I get the following error:

struct takes 1 generic argument but 0 generic arguments were supplied
expected 1 generic argument

luketpeterson avatar Jun 20 '23 03:06 luketpeterson