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

Remove parse_type_from_string #423

Closed
TedDriggs opened this issue Apr 6, 2022 · 1 comment · Fixed by #425
Closed

Remove parse_type_from_string #423

TedDriggs opened this issue Apr 6, 2022 · 1 comment · Fixed by #425
Assignees

Comments

@TedDriggs
Copy link

TedDriggs commented Apr 6, 2022

As of 0.13.3, darling has added impl FromMeta for Type (TedDriggs/darling#172). This removes the need for the adapter, and will preserve span information in your macro outputs, which in turn will produce better errors if people give your macros bad inputs.

If there are other syn types that impl Parse and do not impl FromMeta, please feel free to file issues in TedDriggs/darling and I'll add those as well.

@jonasbb jonasbb self-assigned this Apr 6, 2022
bors bot added a commit that referenced this issue Apr 6, 2022
425: Provide better error messages for type parse failures r=jonasbb a=jonasbb

This relies on a newer `darling` version.

Closes #423

bors merge

Co-authored-by: Jonas Bushart <jonas@bushart.org>
@jonasbb
Copy link
Owner

jonasbb commented Apr 6, 2022

Thanks for the information. That is quite helpful. While rewriting I also noticed that before I never surfaced any error if the type parsing failed, so not only does that fix a layer of Result, but actually resolves an issue.

I will keep missing FromMeta implementations in mind.

@bors bors bot closed this as completed in 86f9eac Apr 6, 2022
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 a pull request may close this issue.

2 participants