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

Parsing error messages not always helpful #48

Closed
SimonSapin opened this issue Oct 18, 2016 · 2 comments
Closed

Parsing error messages not always helpful #48

SimonSapin opened this issue Oct 18, 2016 · 2 comments
Milestone

Comments

@SimonSapin
Copy link
Contributor

Reduced test case:

syn::parse_expr("match foo { Some(a) => a, , None => 0 }").unwrap()

Output:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "failed to parse tokens after expression: \" foo { Some(a) => a, , None => 0 }\""', ../src/libcore/result.rs:799

The error message says that the part of the input that failed to parse is: all of it, except for the initial match keyword. The message is similar when parsing a much larger match expression, with the syntax error somewhere in the middle of it.

@dtolnay dtolnay added this to the 0.13 milestone Jan 2, 2018
@dtolnay
Copy link
Owner

dtolnay commented Jan 2, 2018

Triaging as out of scope for 0.12 but a major focus for 0.13.

@dtolnay
Copy link
Owner

dtolnay commented Jan 13, 2018

Let's continue to track this as part of #47.

@dtolnay dtolnay closed this as completed Jan 13, 2018
@dtolnay dtolnay modified the milestones: 0.13, 0.14 Mar 31, 2018
@dtolnay dtolnay modified the milestones: 0.14, 0.15 Sep 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants