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

Unpredictable what derive attributes allow only literals vs expressions #3173

Closed
2 tasks done
epage opened this issue Dec 14, 2021 · 1 comment
Closed
2 tasks done
Labels
A-derive Area: #[derive]` macro API C-bug Category: Updating dependencies S-waiting-on-mentor Status: Needs elaboration on the details before doing a 'Call for participation'

Comments

@epage
Copy link
Member

epage commented Dec 14, 2021

Please complete the following tasks

  • I have searched the discussions
  • I have searched the existing issues

Rust Version

rustc 1.55.0 (c8dfcfe04 2021-09-06)

Clap Version

v3.0.0-beta.4

Minimal reproducible code

N/A

Steps to reproduce the bug with the above code

Use various attributes without reading the code or documentation

Actual Behaviour

Some will work as literals while others allow any expression

Expected Behaviour

Be consistent. Solving this through documentation will lead to either

  • Users consulting the documentation on each attribute
  • Users keep trying to do things and fail
  • Users using a "safe" subset of the API that avoids the above two

Additional Context

No response

Debug Output

No response

@epage epage added C-bug Category: Updating dependencies A-derive Area: #[derive]` macro API S-waiting-on-mentor Status: Needs elaboration on the details before doing a 'Call for participation' labels Dec 14, 2021
@epage
Copy link
Member Author

epage commented Feb 11, 2022

I think #3452 ended up fixing this.

@epage epage closed this as completed Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-derive Area: #[derive]` macro API C-bug Category: Updating dependencies S-waiting-on-mentor Status: Needs elaboration on the details before doing a 'Call for participation'
Projects
None yet
Development

No branches or pull requests

1 participant