-
Notifications
You must be signed in to change notification settings - Fork 13.3k
When encountering ...
when ..
is expected, parser should suggest the latter
#46718
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
Comments
I volunteer. |
zackmdavis
added a commit
to zackmdavis/rust
that referenced
this issue
Dec 14, 2017
zackmdavis
added a commit
to zackmdavis/rust
that referenced
this issue
Dec 14, 2017
zackmdavis
added a commit
to zackmdavis/rust
that referenced
this issue
Dec 14, 2017
Previously, if an error occured while parsing field patterns, we would just return the error, discarding any field patterns that did successfully parse, which sometimes resulted in spurious diagnostics. At the cost of a little boilerplate (the repetitious `.map_err(|err| ((fields.clone(), etc), err))` is annoying and the present author is sorry to say she could not do better), we can pack the successfully-parsed field patterns into the error and use them. This was inspired by rust-lang#46718.
zackmdavis
added a commit
to zackmdavis/rust
that referenced
this issue
Dec 16, 2017
bors
added a commit
that referenced
this issue
Dec 16, 2017
…_pattern_ellipsis, r=petrochenkov in which `..` is suggested for erroneous `...` in struct field patterns Resolves #46718. Supersedes #46721. r? @petrochenkov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider the following code:
If you try to compile this, you get the following errors:
See the bug?
Its because I used
...
when I should have used..
It would be nice if the compiler, in its ever friendly manner, suggested the latter to me.
The text was updated successfully, but these errors were encountered: