rust/compiler
Dylan DPC 980579a5e9
Rollup merge of #99030 - rust-lang:notriddle/field-recovery, r=petrochenkov
diagnostics: error messages when struct literals fail to parse

If an expression is supplied where a field is expected, the parser can become convinced that it's a shorthand field syntax when it's not.

This PR addresses it by explicitly recording the permitted `:` token immediately after the identifier, and also adds a suggestion to insert the name of the field if it looks like a complex expression.

Fixes #98917
2022-07-13 19:32:35 +05:30
..
2022-07-02 23:30:03 +01:00
2022-07-02 02:11:49 -05:00
2022-07-11 23:20:39 +02:00
2022-07-11 23:20:39 +02:00
2022-07-13 04:49:32 +00:00
2022-07-11 23:20:39 +02:00
2022-07-06 06:41:53 +01:00
2022-07-06 06:41:53 +01:00