Error suggestion for E0027 (pattern missing field) contains erroneous comma #78511
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-bug
Category: This is a bug.
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=4f2737c4c44adb53103b875e0b7044cd
I expected to see this happen:
A suggestion to change
x,
tox, ..
Instead, this happened:
A suggestion to change
x,
tox, ..,
(note the extra comma!)With the comma at the end, I get a parser error and a suggestion to remove the comma.
Meta
Nightly on playground: 1.49.0-nightly (2020-10-27 07e968b)
The text was updated successfully, but these errors were encountered: