rust/src/librustc_parse/parser
Aaron Hill 98757f14d0
Suggest a comma if a struct initializer field fails to parse
Currently, we emit a "try adding a comma" suggestion if a comma is
missing in a struct definition. However, we emit no such suggestion if a
comma is missing in a struct initializer.

This commit adds a "try adding a comma" suggestion when we don't find a
comma during the parsing of a struct initializer field.

The change to `src/test/ui/parser/removed-syntax-with-1.stderr` isn't
great, but I don't see a good way of avoiding it.
2020-02-14 22:28:13 -05:00
..
attr.rs Invert control in struct_lint_level. 2020-02-11 19:47:40 +10:00
diagnostics.rs Invert control in struct_lint_level. 2020-02-11 19:47:40 +10:00
expr.rs Suggest a comma if a struct initializer field fails to parse 2020-02-14 22:28:13 -05:00
generics.rs Use more appropriate spans on object unsafe traits and provide structured suggestions when possible 2020-02-02 11:53:10 -08:00
item.rs parser: inline parse_assoc_macro_invoc 2020-02-13 16:29:10 +01:00
mod.rs parser: misc small item related improvements & cleanups. 2020-02-13 16:29:10 +01:00
module.rs parser: remove Option<Vec<Attribute>> in ItemInfo. 2020-02-13 15:16:36 +01:00
pat.rs Invert control in struct_lint_level. 2020-02-11 19:47:40 +10:00
path.rs parser: Keep current and previous tokens precisely 2020-02-10 00:08:53 +03:00
stmt.rs parser: misc small item related improvements & cleanups. 2020-02-13 16:29:10 +01:00
ty.rs parser: simplify ParamCfg -> ReqName 2020-02-13 10:40:17 +01:00