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

Drop the legacy Result serialization behavior in 5.x #749

Open
itegulov opened this issue Mar 10, 2022 · 3 comments
Open

Drop the legacy Result serialization behavior in 5.x #749

itegulov opened this issue Mar 10, 2022 · 3 comments

Comments

@itegulov
Copy link
Contributor

itegulov commented Mar 10, 2022

Something to consider for 5.x (or another major release):
1. Making #745 the default behavior for all functions that return Result
2. Deleting #[handle_result] annotation
3. Removing compilation error introduced in #748

@uint
Copy link
Contributor

uint commented Aug 18, 2023

Following the discussion in #1057 (comment), I don't think we're going to do this. Should we close this, @frol @agostbiro?

@uint
Copy link
Contributor

uint commented Sep 18, 2023

David Tolnay invented a way to emulate specialization that basically abuses deref coercion.

This weekend, I figured out a way to use this to emulate associated functions with trait specialization.

This looks like a promising way to reliably detect Result<_, _> types in macro expansions, including for the purposes of generating schemas. I might experiment with that sometime soon.

@frol
Copy link
Collaborator

frol commented Sep 18, 2023

@uint Oh, I missed the previous comment, sorry. Well, if we can do that and the UX won't be confusing, I am all ears!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: NEW❗
Development

No branches or pull requests

3 participants