Skip to content

Using number_of_values requires nightly #15

@SpaceManiac

Description

@SpaceManiac

I see that structopt-derive passes along attributes to the Arg builder by default. For arguments which accept non-string values, such as number_of_values, nightly is required:

  • #[structopt(..., number_of_values="1")] is a type mismatch (expected u64, found &str)
  • #[structopt(..., number_of_values=1)] requires nightly and #![feature(attr_literals)]

It doesn't seem like attr_literals is on a quick path to stabilization, so some other form of support may be warranted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions