Rollup merge of #116400 - estebank:issue-78585, r=WaffleLapkin
Detect missing `=>` after match guard during parsing ``` error: expected one of `,`, `:`, or `}`, found `.` --> $DIR/missing-fat-arrow.rs:25:14 | LL | Some(a) if a.value == b { | - while parsing this struct LL | a.value = 1; | -^ expected one of `,`, `:`, or `}` | | | while parsing this struct field | help: try naming a field | LL | a: a.value = 1; | ++ help: you might have meant to start a match arm after the match guard | LL | Some(a) if a.value == b => { | ++ ``` Fix #78585.
This commit is contained in:
commit
0d68e416a5
28 changed files with 225 additions and 41 deletions
|
@ -225,6 +225,10 @@ parse_expected_semi_found_str = expected `;`, found `{$token}`
|
|||
|
||||
parse_expected_statement_after_outer_attr = expected statement after outer attribute
|
||||
|
||||
parse_expected_struct_field = expected one of `,`, `:`, or `{"}"}`, found `{$token}`
|
||||
.label = expected one of `,`, `:`, or `{"}"}`
|
||||
.ident_label = while parsing this struct field
|
||||
|
||||
parse_expected_trait_in_trait_impl_found_type = expected a trait, found type
|
||||
|
||||
parse_extern_crate_name_with_dashes = crate name using dashes are not valid in `extern crate` statements
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue