Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make parse error suggestions verbose and fix spans #127407

Merged
merged 7 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading