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

Parse_Str does not return a correct error #1780

Open
Bleachfuel opened this issue Nov 9, 2024 · 0 comments
Open

Parse_Str does not return a correct error #1780

Bleachfuel opened this issue Nov 9, 2024 · 0 comments

Comments

@Bleachfuel
Copy link

why does parse_str not return the span at which it failed? Or does it do that and am I missing something, because I'm having trouble highlighting the spans at which parsing fails.

        if let Some(lit) = literal {
            syn::parse_str::<syn::WherePredicate>(&lit.value())
            .map(Some)
            .map_err(|err| {
                syn::Error::new_spanned(lit, err)
            })
        } else {
            Ok(None)
        }
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

No branches or pull requests

1 participant