-
Notifications
You must be signed in to change notification settings - Fork 94
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
expected
error strings always quote what was expected, even if it isn't a literal
#334
Comments
I'd propose we have a enum Item {
Literal(String),
Other(String),
} (obviously some naming could be improved) We could have some I'm willing to implement this, just looking for a go ahead. |
It would be a breaking change to make this change to the "easy errors" now and I am not willing to do that for just this (the error handling could use an overhaul though). So you may need to implement your own errors, or convert the easy errors before displaying them. |
In looking to see if there was a way to do this without a breaking change, it turned out |
When reviewing cargo moving fron `toml-rs` (hand-rolled parser) to `toml_edit` (`combine`-based parser), one piece of feedback was about only wanting tokens quoted and not textual descriptions. It looks like `combine` tracks all of the needed information and just a re-formatting of the output is needed. Fixes Marwes#334
When reviewing cargo moving fron `toml-rs` (hand-rolled parser) to `toml_edit` (`combine`-based parser), one piece of feedback was about only wanting tokens quoted and not textual descriptions. It looks like `combine` tracks all of the needed information and just a re-formatting of the output is needed. Fixes Marwes#334
toml_edit sets some
expected
for not what character is next but what grammar item is expected (e.g. "key").This means they are quoted, like literals. See review comments on rust-lang/cargo#10086
The text was updated successfully, but these errors were encountered: