rust/compiler/rustc_parse/src
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
..
lexer remove unnecessary to_string and String::new 2022-06-13 15:48:40 +09:00
parser Rollup merge of #99030 - rust-lang:notriddle/field-recovery, r=petrochenkov 2022-07-13 19:32:35 +05:30
lib.rs various: add rustc_lint_diagnostics to diag fns 2022-06-27 08:32:06 +01:00
validate_attr.rs Overhaul MacArgs::Eq. 2022-05-05 07:06:12 +10:00