Skip to content

#[derive(OnlyArgs)] fails to recognize type aliases #17

@z33ky

Description

@z33ky
#!/usr/bin/env -S cargo +nightly -Z script
```cargo
[dependencies]
onlyargs = "0.1.2"
onlyargs_derive = "0.1.2"
```
type MyInt = i32;

#[derive(onlyargs_derive::OnlyArgs)]
struct MyArgs {
    number: MyInt,
}

fn main() {
    onlyargs::parse::<MyArgs>().unwrap();
}

This results in the following error

error: Expected bool, PathBuf, String, OsString, integer, or float
  --> onlyalias.rs:11:13
   |
11 |     number: MyInt,
   |             ^^^^^

I guess this is a limitation due to using myn.
I'm not sure if it's easy to support/select either myn or syn via cargo-feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions