Skip to content

Commit

Permalink
Rollup merge of rust-lang#127407 - estebank:parser-suggestions, r=oli…
Browse files Browse the repository at this point in the history
…-obk

Make parse error suggestions verbose and fix spans

Go over all structured parser suggestions and make them verbose style.

When suggesting to add or remove delimiters, turn them into multiple suggestion parts.
  • Loading branch information
matthiaskrgr authored Jul 15, 2024
2 parents cc2b89d + 71f16bd commit 4aeac60
Show file tree
Hide file tree
Showing 166 changed files with 3,052 additions and 777 deletions.
10 changes: 5 additions & 5 deletions compiler/rustc_parse/messages.ftl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parse_add_paren = try adding parentheses
parse_ambiguous_range_pattern = the range pattern here has ambiguous interpretation
.suggestion = add parentheses to clarify the precedence
parse_ambiguous_range_pattern_suggestion = add parentheses to clarify the precedence
parse_array_brackets_instead_of_braces = this is a block expression, not an array
.suggestion = to make an array, use square brackets instead of curly braces
Expand Down Expand Up @@ -323,10 +323,10 @@ parse_incorrect_semicolon =
.suggestion = remove this semicolon
.help = {$name} declarations are not followed by a semicolon
parse_incorrect_use_of_await =
incorrect use of `await`
parse_incorrect_use_of_await = incorrect use of `await`
.parentheses_suggestion = `await` is not a method call, remove the parentheses
.postfix_suggestion = `await` is a postfix operation
parse_incorrect_use_of_await_postfix_suggestion = `await` is a postfix operation
parse_incorrect_visibility_restriction = incorrect visibility restriction
.help = some possible visibility restrictions are:
Expand Down Expand Up @@ -644,7 +644,7 @@ parse_parentheses_with_struct_fields = invalid `struct` delimiters or `fn` call
.suggestion_no_fields_for_fn = if `{$type}` is a function, use the arguments directly
parse_parenthesized_lifetime = parenthesized lifetime bounds are not supported
.suggestion = remove the parentheses
parse_parenthesized_lifetime_suggestion = remove the parentheses
parse_path_single_colon = path separator must be a double colon
.suggestion = use a double colon instead
Expand Down
Loading

0 comments on commit 4aeac60

Please sign in to comment.