-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Derive parser: FromStr implemention with Err=Box<dyn Error> causes inscrutible compiler error #5736
Comments
The error message
|
We have a trait to "infer
We have 6 traits available to provide
when inferring for To fix this, change type Err = Box<dyn std::error::Error>; to type Err = Box<dyn std::error::Error + Send + Sync>; |
#5704 previously improved the error message (browse per-commit to see how it evolved). There isn't a |
I see. Thanks for the quick reply and explanation 🙂 Maybe if/when |
Please complete the following tasks
Rust Version
1.81.0
Clap Version
4.5.17
Minimal reproducible code
Steps to reproduce the bug with the above code
Compile the code
Actual Behaviour
It rejects the code, and the error message is rather unhelpful
Expected Behaviour
Either this should be supported (I don't know why it isn't, but it may be non-trivial), or ideally the error message should be improved
Additional Context
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=5598d6ddacf4b3784b92969617c54318
Debug Output
No response
The text was updated successfully, but these errors were encountered: