980579a5e9
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 |
||
---|---|---|
.. | ||
lexer | ||
parser | ||
lib.rs | ||
validate_attr.rs |