generalize help message
This commit is contained in:
parent
70fd012439
commit
32da026c35
@ -220,7 +220,7 @@ parse_match_arm_body_without_braces = `match` arm body without braces
|
|||||||
[one] statement
|
[one] statement
|
||||||
*[other] statements
|
*[other] statements
|
||||||
} with a body
|
} with a body
|
||||||
.suggestion_use_comma_not_semicolon = use a comma to end a `match` arm expression
|
.suggestion_use_comma_not_semicolon = replace `;` with `,` to end a `match` arm expression
|
||||||
|
|
||||||
parse_inclusive_range_extra_equals = unexpected `=` after inclusive range
|
parse_inclusive_range_extra_equals = unexpected `=` after inclusive range
|
||||||
.suggestion_remove_eq = use `..=` instead
|
.suggestion_remove_eq = use `..=` instead
|
||||||
|
@ -2,10 +2,14 @@ error: `match` arm body without braces
|
|||||||
--> $DIR/match-arm-without-braces.rs:26:27
|
--> $DIR/match-arm-without-braces.rs:26:27
|
||||||
|
|
|
|
||||||
LL | Some(Val::Foo) => 3;
|
LL | Some(Val::Foo) => 3;
|
||||||
| -- ^- help: use a comma to end a `match` arm expression: `,`
|
| -- ^ this statement is not surrounded by a body
|
||||||
| | |
|
| |
|
||||||
| | this statement is not surrounded by a body
|
|
||||||
| while parsing the `match` arm starting here
|
| while parsing the `match` arm starting here
|
||||||
|
|
|
||||||
|
help: replace `;` with `,` to end a `match` arm expression
|
||||||
|
|
|
||||||
|
LL | Some(Val::Foo) => 3,
|
||||||
|
| ~
|
||||||
|
|
||||||
error: `match` arm body without braces
|
error: `match` arm body without braces
|
||||||
--> $DIR/match-arm-without-braces.rs:31:11
|
--> $DIR/match-arm-without-braces.rs:31:11
|
||||||
|
Loading…
x
Reference in New Issue
Block a user