Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unqualified result types causing compilation failures with derive implementations #3142

Merged

Conversation

spire-ffoston
Copy link
Contributor

Fixes some additional unqualified types in the derive macros and adds a regression test case.

Copy link
Member

@pksunkara pksunkara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add Option alias too and rename the test?

@spire-ffoston spire-ffoston force-pushed the fix-result-type-alias-derive-impl branch from e3f80f6 to 746ff3e Compare December 10, 2021 14:11
@spire-ffoston spire-ffoston force-pushed the fix-result-type-alias-derive-impl branch from 746ff3e to 1285c0f Compare December 10, 2021 14:13
@pksunkara pksunkara merged commit 0eda43d into clap-rs:master Dec 10, 2021
@epage
Copy link
Member

epage commented Dec 10, 2021

Thanks! I had been considering adding a test like that.

epage added a commit to epage/clap that referenced this pull request Jun 13, 2022
With the new `ArgMatches`, we need to know what the inner type is.

Unfortunately, clap-rs#3142 didn't list use cases for this.  We dropped the
`Option` alias changing `T` but we still have a `Result` in there that
is aliased.

One potential workaround if people need it is if we add an attribute to
specify the `get_many::<T>` type.  This would also help with
`ArgAction::Count` to support more data types.
epage added a commit to epage/clap that referenced this pull request Jun 14, 2022
With the new `ArgMatches`, we need to know what the inner type is.

Unfortunately, clap-rs#3142 didn't list use cases for this.  We dropped the
`Option` alias changing `T` but we still have a `Result` in there that
is aliased.

One potential workaround if people need it is if we add an attribute to
specify the `get_many::<T>` type.  This would also help with
`ArgAction::Count` to support more data types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants