about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/src
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-07-13 19:32:35 +0530
committerGitHub <noreply@github.com>2022-07-13 19:32:35 +0530
commit980579a5e9f5fcad63ef71f536efec15ccd56511 (patch)
tree97af1124c9f5ff63987ced8fce1cf941f2a1fa29 /compiler/rustc_codegen_gcc/src
parent1e7d04b23b6e9d177e7d879b05b4ce3f00ee5a0e (diff)
parent9fcb9c6648331f372ee58ce4489d3d43a0723c59 (diff)
downloadrust-980579a5e9f5fcad63ef71f536efec15ccd56511.tar.gz
rust-980579a5e9f5fcad63ef71f536efec15ccd56511.zip
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
Diffstat (limited to 'compiler/rustc_codegen_gcc/src')
0 files changed, 0 insertions, 0 deletions