1 parse_struct_literal_body_without_path =
2 struct literal body without path
3 .suggestion = you might have forgotten to add the struct literal inside the block
5 parse_struct_literal_needing_parens =
7 .suggestion = you might need to surround the struct literal in parentheses
9 parse_maybe_report_ambiguous_plus =
10 ambiguous `+` in a type
11 .suggestion = use parentheses to disambiguate
13 parse_maybe_recover_from_bad_type_plus =
14 expected a path on the left-hand side of `+`, not `{$ty}`
16 parse_add_paren = try adding parentheses
18 parse_forgot_paren = perhaps you forgot parentheses?
20 parse_expect_path = expected a path
22 parse_maybe_recover_from_bad_qpath_stage_2 =
23 missing angle brackets in associated item path
24 .suggestion = try: `{$ty}`
26 parse_incorrect_semicolon =
27 expected item, found `;`
28 .suggestion = remove this semicolon
29 .help = {$name} declarations are not followed by a semicolon
31 parse_incorrect_use_of_await =
32 incorrect use of `await`
33 .parentheses_suggestion = `await` is not a method call, remove the parentheses
34 .postfix_suggestion = `await` is a postfix operation
37 expected iterable, found keyword `in`
38 .suggestion = remove the duplicated `in`
40 parse_invalid_variable_declaration =
41 invalid variable declaration
43 parse_switch_mut_let_order =
44 switch the order of `mut` and `let`
45 parse_missing_let_before_mut = missing keyword
46 parse_use_let_not_auto = write `let` instead of `auto` to introduce a new variable
47 parse_use_let_not_var = write `let` instead of `var` to introduce a new variable
49 parse_invalid_comparison_operator = invalid comparison operator `{$invalid}`
50 .use_instead = `{$invalid}` is not a valid comparison operator, use `{$correct}`
51 .spaceship_operator_invalid = `<=>` is not a valid comparison operator, use `std::cmp::Ordering`
53 parse_invalid_logical_operator = `{$incorrect}` is not a logical operator
54 .note = unlike in e.g., Python and PHP, `&&` and `||` are used for logical operators
55 .use_amp_amp_for_conjunction = use `&&` to perform logical conjunction
56 .use_pipe_pipe_for_disjunction = use `||` to perform logical disjunction
58 parse_tilde_is_not_unary_operator = `~` cannot be used as a unary operator
59 .suggestion = use `!` to perform bitwise not
61 parse_unexpected_if_with_if = unexpected `if` in the condition expression
62 .suggestion = remove the `if`
64 parse_unexpected_token_after_not = unexpected {$negated_desc} after identifier
65 parse_unexpected_token_after_not_bitwise = use `!` to perform bitwise not
66 parse_unexpected_token_after_not_logical = use `!` to perform logical negation
67 parse_unexpected_token_after_not_default = use `!` to perform logical negation or bitwise not
69 parse_malformed_loop_label = malformed loop label
70 .suggestion = use the correct loop label format
72 parse_lifetime_in_borrow_expression = borrow expressions cannot be annotated with lifetimes
73 .suggestion = remove the lifetime annotation
74 .label = annotated with lifetime here
76 parse_field_expression_with_generic = field expressions cannot have generic arguments
78 parse_macro_invocation_with_qualified_path = macros cannot use qualified paths
80 parse_unexpected_token_after_label = expected `while`, `for`, `loop` or `{"{"}` after a label
81 .suggestion_remove_label = consider removing the label
82 .suggestion_enclose_in_block = consider enclosing expression in a block
84 parse_require_colon_after_labeled_expression = labeled expression must be followed by `:`
85 .note = labels are used before loops and blocks, allowing e.g., `break 'label` to them
87 .suggestion = add `:` after the label
89 parse_do_catch_syntax_removed = found removed `do catch` syntax
90 .note = following RFC #2388, the new non-placeholder syntax is `try`
91 .suggestion = replace with the new syntax
93 parse_float_literal_requires_integer_part = float literals must have an integer part
94 .suggestion = must have an integer part
96 parse_missing_semicolon_before_array = expected `;`, found `[`
97 .suggestion = consider adding `;` here
99 parse_invalid_block_macro_segment = cannot use a `block` macro fragment here
100 .label = the `block` fragment is within this context
102 parse_expect_dotdot_not_dotdotdot = expected `..`, found `...`
103 .suggestion = use `..` to fill in the rest of the fields
105 parse_if_expression_missing_then_block = this `if` expression is missing a block after the condition
106 .add_then_block = add a block here
107 .condition_possibly_unfinished = this binary operation is possibly unfinished
109 parse_if_expression_missing_condition = missing condition for `if` expression
110 .condition_label = expected condition here
111 .block_label = if this block is the condition of the `if` expression, then it must be followed by another block
113 parse_expected_expression_found_let = expected expression, found `let` statement
115 parse_expect_eq_instead_of_eqeq = expected `=`, found `==`
116 .suggestion = consider using `=` here
118 parse_expected_else_block = expected `{"{"}`, found {$first_tok}
119 .label = expected an `if` or a block after this `else`
120 .suggestion = add an `if` if this is the condition of a chained `else if` statement
122 parse_outer_attribute_not_allowed_on_if_else = outer attributes are not allowed on `if` and `else` branches
123 .branch_label = the attributes are attached to this branch
124 .ctx_label = the branch belongs to this `{$ctx}`
125 .suggestion = remove the attributes
127 parse_missing_in_in_for_loop = missing `in` in `for` loop
128 .use_in_not_of = try using `in` here instead
129 .add_in = try adding `in` here
131 parse_missing_comma_after_match_arm = expected `,` following `match` arm
132 .suggestion = missing a comma here to end this `match` arm
134 parse_catch_after_try = keyword `catch` cannot follow a `try` block
135 .help = try using `match` on the result of the `try` block instead
137 parse_comma_after_base_struct = cannot use a comma after the base struct
138 .note = the base struct must always be the last field
139 .suggestion = remove this comma
141 parse_eq_field_init = expected `:`, found `=`
142 .suggestion = replace equals symbol with a colon
144 parse_dotdotdot = unexpected token: `...`
145 .suggest_exclusive_range = use `..` for an exclusive range
146 .suggest_inclusive_range = or `..=` for an inclusive range
148 parse_left_arrow_operator = unexpected token: `<-`
149 .suggestion = if you meant to write a comparison against a negative value, add a space in between `<` and `-`
151 parse_remove_let = expected pattern, found `let`
152 .suggestion = remove the unnecessary `let` keyword
154 parse_use_eq_instead = unexpected `==`
155 .suggestion = try using `=` instead
157 parse_use_empty_block_not_semi = expected { "`{}`" }, found `;`
158 .suggestion = try using { "`{}`" } instead
160 parse_comparison_interpreted_as_generic =
161 `<` is interpreted as a start of generic arguments for `{$type}`, not a comparison
162 .label_args = interpreted as generic arguments
163 .label_comparison = not interpreted as comparison
164 .suggestion = try comparing the cast value
166 parse_shift_interpreted_as_generic =
167 `<<` is interpreted as a start of generic arguments for `{$type}`, not a shift
168 .label_args = interpreted as generic arguments
169 .label_comparison = not interpreted as shift
170 .suggestion = try shifting the cast value
172 parse_found_expr_would_be_stmt = expected expression, found `{$token}`
173 .label = expected expression
175 parse_leading_plus_not_supported = leading `+` is not supported
176 .label = unexpected `+`
177 .suggestion_remove_plus = try removing the `+`
179 parse_parentheses_with_struct_fields = invalid `struct` delimiters or `fn` call arguments
180 .suggestion_braces_for_struct = if `{$type}` is a struct, use braces as delimiters
181 .suggestion_no_fields_for_fn = if `{$type}` is a function, use the arguments directly
183 parse_labeled_loop_in_break = parentheses are required around this expression to avoid confusion with a labeled break expression
185 parse_sugg_wrap_expression_in_parentheses = wrap the expression in parentheses
187 parse_array_brackets_instead_of_braces = this is a block expression, not an array
188 .suggestion = to make an array, use square brackets instead of curly braces
190 parse_match_arm_body_without_braces = `match` arm body without braces
191 .label_statements = {$num_statements ->
192 [one] this statement is not surrounded by a body
193 *[other] these statements are not surrounded by a body
195 .label_arrow = while parsing the `match` arm starting here
196 .suggestion_add_braces = surround the {$num_statements ->
200 .suggestion_use_comma_not_semicolon = use a comma to end a `match` arm expression
202 parse_inclusive_range_extra_equals = unexpected `=` after inclusive range
203 .suggestion_remove_eq = use `..=` instead
204 .note = inclusive ranges end with a single equals sign (`..=`)
206 parse_inclusive_range_match_arrow = unexpected `>` after inclusive range
207 .label = this is parsed as an inclusive range `..=`
208 .suggestion = add a space between the pattern and `=>`
210 parse_inclusive_range_no_end = inclusive range with no end
211 .suggestion_open_range = use `..` instead
212 .note = inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
214 parse_struct_literal_not_allowed_here = struct literals are not allowed here
215 .suggestion = surround the struct literal with parentheses
217 parse_invalid_interpolated_expression = invalid interpolated expression
219 parse_invalid_literal_suffix_on_tuple_index = suffixes on a tuple index are invalid
220 .label = invalid suffix `{$suffix}`
221 .tuple_exception_line_1 = `{$suffix}` is *temporarily* accepted on tuple index fields as it was incorrectly accepted on stable for a few releases
222 .tuple_exception_line_2 = on proc macros, you'll want to use `syn::Index::from` or `proc_macro::Literal::*_unsuffixed` for code that will desugar to tuple field access
223 .tuple_exception_line_3 = see issue #60210 <https://github.com/rust-lang/rust/issues/60210> for more information
225 parse_non_string_abi_literal = non-string ABI literal
226 .suggestion = specify the ABI with a string literal
228 parse_mismatched_closing_delimiter = mismatched closing delimiter: `{$delimiter}`
229 .label_unmatched = mismatched closing delimiter
230 .label_opening_candidate = closing delimiter possibly meant for this
231 .label_unclosed = unclosed delimiter
233 parse_incorrect_visibility_restriction = incorrect visibility restriction
234 .help = some possible visibility restrictions are:
235 `pub(crate)`: visible only on the current crate
236 `pub(super)`: visible only in the current module's parent
237 `pub(in path::to::module)`: visible only on the specified path
238 .suggestion = make this visible only to module `{$inner_str}` with `in`
240 parse_assignment_else_not_allowed = <assignment> ... else {"{"} ... {"}"} is not allowed
242 parse_expected_statement_after_outer_attr = expected statement after outer attribute
244 parse_doc_comment_does_not_document_anything = found a documentation comment that doesn't document anything
245 .help = doc comments must come before what they document, if a comment was intended use `//`
246 .suggestion = missing comma here
248 parse_const_let_mutually_exclusive = `const` and `let` are mutually exclusive
249 .suggestion = remove `let`
251 parse_invalid_expression_in_let_else = a `{$operator}` expression cannot be directly assigned in `let...else`
252 parse_invalid_curly_in_let_else = right curly brace `{"}"}` before `else` in a `let...else` statement not allowed
253 parse_extra_if_in_let_else = remove the `if` if you meant to write a `let...else` statement
255 parse_compound_assignment_expression_in_let = can't reassign to an uninitialized variable
256 .suggestion = initialize the variable
257 .help = if you meant to overwrite, remove the `let` binding
259 parse_suffixed_literal_in_attribute = suffixed literals are not allowed in attributes
260 .help = instead of using a suffixed literal (`1u8`, `1.0f32`, etc.), use an unsuffixed version (`1`, `1.0`, etc.)
262 parse_invalid_meta_item = expected unsuffixed literal or identifier, found `{$token}`
264 parse_label_inner_attr_does_not_annotate_this = the inner attribute doesn't annotate this {$item}
265 parse_sugg_change_inner_attr_to_outer = to annotate the {$item}, change the attribute from inner to outer style
267 parse_inner_attr_not_permitted_after_outer_doc_comment = an inner attribute is not permitted following an outer doc comment
268 .label_attr = not permitted following an outer doc comment
269 .label_prev_doc_comment = previous doc comment
270 .label_does_not_annotate_this = {parse_label_inner_attr_does_not_annotate_this}
271 .sugg_change_inner_to_outer = {parse_sugg_change_inner_attr_to_outer}
273 parse_inner_attr_not_permitted_after_outer_attr = an inner attribute is not permitted following an outer attribute
274 .label_attr = not permitted following an outer attribute
275 .label_prev_attr = previous outer attribute
276 .label_does_not_annotate_this = {parse_label_inner_attr_does_not_annotate_this}
277 .sugg_change_inner_to_outer = {parse_sugg_change_inner_attr_to_outer}
279 parse_inner_attr_not_permitted = an inner attribute is not permitted in this context
280 .label_does_not_annotate_this = {parse_label_inner_attr_does_not_annotate_this}
281 .sugg_change_inner_to_outer = {parse_sugg_change_inner_attr_to_outer}
283 parse_inner_attr_explanation = inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
284 parse_outer_attr_explanation = outer attributes, like `#[test]`, annotate the item following them
286 parse_inner_doc_comment_not_permitted = expected outer doc comment
287 .note = inner doc comments like this (starting with `//!` or `/*!`) can only appear before items
288 .suggestion = you might have meant to write a regular comment
289 .label_does_not_annotate_this = the inner doc comment doesn't annotate this {$item}
290 .sugg_change_inner_to_outer = to annotate the {$item}, change the doc comment from inner to outer style
292 parse_expected_identifier_found_reserved_identifier_str = expected identifier, found reserved identifier `{$token}`
293 parse_expected_identifier_found_keyword_str = expected identifier, found keyword `{$token}`
294 parse_expected_identifier_found_reserved_keyword_str = expected identifier, found reserved keyword `{$token}`
295 parse_expected_identifier_found_doc_comment_str = expected identifier, found doc comment `{$token}`
296 parse_expected_identifier_found_str = expected identifier, found `{$token}`
298 parse_expected_identifier_found_reserved_identifier = expected identifier, found reserved identifier
299 parse_expected_identifier_found_keyword = expected identifier, found keyword
300 parse_expected_identifier_found_reserved_keyword = expected identifier, found reserved keyword
301 parse_expected_identifier_found_doc_comment = expected identifier, found doc comment
302 parse_expected_identifier = expected identifier
304 parse_sugg_escape_to_use_as_identifier = escape `{$ident_name}` to use it as an identifier
306 parse_sugg_remove_comma = remove this comma
308 parse_expected_semi_found_reserved_identifier_str = expected `;`, found reserved identifier `{$token}`
309 parse_expected_semi_found_keyword_str = expected `;`, found keyword `{$token}`
310 parse_expected_semi_found_reserved_keyword_str = expected `;`, found reserved keyword `{$token}`
311 parse_expected_semi_found_doc_comment_str = expected `;`, found doc comment `{$token}`
312 parse_expected_semi_found_str = expected `;`, found `{$token}`
314 parse_sugg_change_this_to_semi = change this to `;`
315 parse_sugg_add_semi = add `;` here
316 parse_label_unexpected_token = unexpected token
318 parse_unmatched_angle_brackets = {$num_extra_brackets ->
319 [one] unmatched angle bracket
320 *[other] unmatched angle brackets
322 .suggestion = {$num_extra_brackets ->
323 [one] remove extra angle bracket
324 *[other] remove extra angle brackets
327 parse_generic_parameters_without_angle_brackets = generic parameters without surrounding angle brackets
328 .suggestion = surround the type parameters with angle brackets
330 parse_comparison_operators_cannot_be_chained = comparison operators cannot be chained
331 .sugg_parentheses_for_function_args = or use `(...)` if you meant to specify fn arguments
332 .sugg_split_comparison = split the comparison into two
333 .sugg_parenthesize = parenthesize the comparison
334 parse_sugg_turbofish_syntax = use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
336 parse_question_mark_in_type = invalid `?` in type
337 .label = `?` is only allowed on expressions, not types
338 .suggestion = if you meant to express that the type might not contain a value, use the `Option` wrapper type
340 parse_unexpected_parentheses_in_for_head = unexpected parentheses surrounding `for` loop head
341 .suggestion = remove parentheses in `for` loop
343 parse_doc_comment_on_param_type = documentation comments cannot be applied to a function parameter's type
344 .label = doc comments are not allowed here
346 parse_attribute_on_param_type = attributes cannot be applied to a function parameter's type
347 .label = attributes are not allowed here
349 parse_pattern_method_param_without_body = patterns aren't allowed in methods without bodies
350 .suggestion = give this argument a name or use an underscore to ignore it
352 parse_self_param_not_first = unexpected `self` parameter in function
353 .label = must be the first parameter of an associated function
355 parse_const_generic_without_braces = expressions must be enclosed in braces to be used as const generic arguments
356 .suggestion = enclose the `const` expression in braces
358 parse_unexpected_const_param_declaration = unexpected `const` parameter declaration
359 .label = expected a `const` expression, not a parameter declaration
360 .suggestion = `const` parameters must be declared for the `impl`
362 parse_unexpected_const_in_generic_param = expected lifetime, type, or constant, found keyword `const`
363 .suggestion = the `const` keyword is only needed in the definition of the type
365 parse_async_move_order_incorrect = the order of `move` and `async` is incorrect
366 .suggestion = try switching the order
368 parse_double_colon_in_bound = expected `:` followed by trait or lifetime
369 .suggestion = use single colon
371 parse_fn_ptr_with_generics = function pointer types may not have generic parameters
372 .suggestion = consider moving the lifetime {$arity ->
375 } to {$for_param_list_exists ->
378 } `for` parameter list
380 parse_invalid_identifier_with_leading_number = expected identifier, found number literal
381 .label = identifiers cannot start with a number
383 parse_maybe_fn_typo_with_impl = you might have meant to write `impl` instead of `fn`
384 .suggestion = replace `fn` with `impl` here
386 parse_expected_fn_path_found_fn_keyword = expected identifier, found keyword `fn`
387 .suggestion = use `Fn` to refer to the trait
389 parse_where_clause_before_tuple_struct_body = where clauses are not allowed before tuple struct bodies
390 .label = unexpected where clause
391 .name_label = while parsing this tuple struct
392 .body_label = the struct body
393 .suggestion = move the body before the where clause
395 parse_async_fn_in_2015 = `async fn` is not permitted in Rust 2015
396 .label = to use `async fn`, switch to Rust 2018 or later
398 parse_async_block_in_2015 = `async` blocks are only allowed in Rust 2018 or later
400 parse_self_argument_pointer = cannot pass `self` by raw pointer
401 .label = cannot pass `self` by raw pointer
403 parse_visibility_not_followed_by_item = visibility `{$vis}` is not followed by an item
404 .label = the visibility
405 .help = you likely meant to define an item, e.g., `{$vis} fn foo() {"{}"}`
407 parse_default_not_followed_by_item = `default` is not followed by an item
408 .label = the `default` qualifier
409 .note = only `fn`, `const`, `type`, or `impl` items may be prefixed by `default`
411 parse_missing_struct_for_struct_definition = missing `struct` for struct definition
412 .suggestion = add `struct` here to parse `{$ident}` as a public struct
414 parse_missing_fn_for_function_definition = missing `fn` for function definition
415 .suggestion = add `fn` here to parse `{$ident}` as a public function
417 parse_missing_fn_for_method_definition = missing `fn` for method definition
418 .suggestion = add `fn` here to parse `{$ident}` as a public method
420 parse_ambiguous_missing_keyword_for_item_definition = missing `fn` or `struct` for function or struct definition
421 .suggestion = if you meant to call a macro, try
422 .help = if you meant to call a macro, remove the `pub` and add a trailing `!` after the identifier
424 parse_missing_trait_in_trait_impl = missing trait in a trait impl
425 .suggestion_add_trait = add a trait here
426 .suggestion_remove_for = for an inherent impl, drop this `for`
428 parse_missing_for_in_trait_impl = missing `for` in a trait impl
429 .suggestion = add `for` here
431 parse_expected_trait_in_trait_impl_found_type = expected a trait, found type
433 parse_non_item_in_item_list = non-item in item list
434 .suggestion_use_const_not_let = consider using `const` instead of `let` for associated const
435 .label_list_start = item list starts here
436 .label_non_item = non-item starts here
437 .label_list_end = item list ends here
438 .suggestion_remove_semicolon = consider removing this semicolon
440 parse_bounds_not_allowed_on_trait_aliases = bounds are not allowed on trait aliases
442 parse_trait_alias_cannot_be_auto = trait aliases cannot be `auto`
443 parse_trait_alias_cannot_be_unsafe = trait aliases cannot be `unsafe`
445 parse_associated_static_item_not_allowed = associated `static` items are not allowed
447 parse_extern_crate_name_with_dashes = crate name using dashes are not valid in `extern crate` statements
448 .label = dash-separated idents are not valid
449 .suggestion = if the original crate name uses dashes you need to use underscores in the code
451 parse_extern_item_cannot_be_const = extern items cannot be `const`
452 .suggestion = try using a static value
453 .note = for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
455 parse_const_global_cannot_be_mutable = const globals cannot be mutable
456 .label = cannot be mutable
457 .suggestion = you might want to declare a static instead
459 parse_missing_const_type = missing type for `{$kind}` item
460 .suggestion = provide a type for the item
462 parse_enum_struct_mutually_exclusive = `enum` and `struct` are mutually exclusive
463 .suggestion = replace `enum struct` with
465 parse_unexpected_token_after_struct_name = expected `where`, `{"{"}`, `(`, or `;` after struct name
466 parse_unexpected_token_after_struct_name_found_reserved_identifier = expected `where`, `{"{"}`, `(`, or `;` after struct name, found reserved identifier `{$token}`
467 parse_unexpected_token_after_struct_name_found_keyword = expected `where`, `{"{"}`, `(`, or `;` after struct name, found keyword `{$token}`
468 parse_unexpected_token_after_struct_name_found_reserved_keyword = expected `where`, `{"{"}`, `(`, or `;` after struct name, found reserved keyword `{$token}`
469 parse_unexpected_token_after_struct_name_found_doc_comment = expected `where`, `{"{"}`, `(`, or `;` after struct name, found doc comment `{$token}`
470 parse_unexpected_token_after_struct_name_found_other = expected `where`, `{"{"}`, `(`, or `;` after struct name, found `{$token}`
472 parse_unexpected_self_in_generic_parameters = unexpected keyword `Self` in generic parameters
473 .note = you cannot use `Self` as a generic parameter because it is reserved for associated items
475 parse_multiple_where_clauses = cannot define duplicate `where` clauses on an item
476 .label = previous `where` clause starts here
477 .suggestion = consider joining the two `where` clauses into one
479 parse_nonterminal_expected_item_keyword = expected an item keyword
480 parse_nonterminal_expected_statement = expected a statement
481 parse_nonterminal_expected_ident = expected ident, found `{$token}`
482 parse_nonterminal_expected_lifetime = expected a lifetime, found `{$token}`
484 parse_or_pattern_not_allowed_in_let_binding = top-level or-patterns are not allowed in `let` bindings
485 parse_or_pattern_not_allowed_in_fn_parameters = top-level or-patterns are not allowed in function parameters
486 parse_sugg_remove_leading_vert_in_pattern = remove the `|`
487 parse_sugg_wrap_pattern_in_parens = wrap the pattern in parentheses
489 parse_note_pattern_alternatives_use_single_vert = alternatives in or-patterns are separated with `|`, not `||`
491 parse_unexpected_vert_vert_before_function_parameter = unexpected `||` before function parameter
492 .suggestion = remove the `||`
494 parse_label_while_parsing_or_pattern_here = while parsing this or-pattern starting here
496 parse_unexpected_vert_vert_in_pattern = unexpected token `||` in pattern
497 .suggestion = use a single `|` to separate multiple alternative patterns
499 parse_trailing_vert_not_allowed = a trailing `|` is not allowed in an or-pattern
500 .suggestion = remove the `{$token}`
502 parse_dotdotdot_rest_pattern = unexpected `...`
503 .label = not a valid pattern
504 .suggestion = for a rest pattern, use `..` instead of `...`
506 parse_pattern_on_wrong_side_of_at = pattern on wrong side of `@`
507 .label_pattern = pattern on the left, should be on the right
508 .label_binding = binding on the right, should be on the left
509 .suggestion = switch the order
511 parse_expected_binding_left_of_at = left-hand side of `@` must be a binding
512 .label_lhs = interpreted as a pattern, not a binding
513 .label_rhs = also a pattern
514 .note = bindings are `x`, `mut x`, `ref x`, and `ref mut x`
516 parse_ambiguous_range_pattern = the range pattern here has ambiguous interpretation
517 .suggestion = add parentheses to clarify the precedence
519 parse_unexpected_lifetime_in_pattern = unexpected lifetime `{$symbol}` in pattern
520 .suggestion = remove the lifetime
522 parse_ref_mut_order_incorrect = the order of `mut` and `ref` is incorrect
523 .suggestion = try switching the order
525 parse_mut_on_nested_ident_pattern = `mut` must be attached to each individual binding
526 .suggestion = add `mut` to each binding
527 parse_mut_on_non_ident_pattern = `mut` must be followed by a named binding
528 .suggestion = remove the `mut` prefix
529 parse_note_mut_pattern_usage = `mut` may be followed by `variable` and `variable @ pattern`
531 parse_repeated_mut_in_pattern = `mut` on a binding may not be repeated
532 .suggestion = remove the additional `mut`s
534 parse_dot_dot_dot_range_to_pattern_not_allowed = range-to patterns with `...` are not allowed
535 .suggestion = use `..=` instead
537 parse_enum_pattern_instead_of_identifier = expected identifier, found enum pattern
539 parse_dot_dot_dot_for_remaining_fields = expected field pattern, found `...`
540 .suggestion = to omit remaining fields, use one fewer `.`
542 parse_expected_comma_after_pattern_field = expected `,`
544 parse_return_types_use_thin_arrow = return types are denoted using `->`
545 .suggestion = use `->` instead
547 parse_need_plus_after_trait_object_lifetime = lifetime in trait object type must be followed by `+`
549 parse_expected_mut_or_const_in_raw_pointer_type = expected `mut` or `const` keyword in raw pointer type
550 .suggestion = add `mut` or `const` here
552 parse_lifetime_after_mut = lifetime must precede `mut`
553 .suggestion = place the lifetime before `mut`
555 parse_dyn_after_mut = `mut` must precede `dyn`
556 .suggestion = place `mut` before `dyn`
558 parse_fn_pointer_cannot_be_const = an `fn` pointer type cannot be `const`
559 .label = `const` because of this
560 .suggestion = remove the `const` qualifier
562 parse_fn_pointer_cannot_be_async = an `fn` pointer type cannot be `async`
563 .label = `async` because of this
564 .suggestion = remove the `async` qualifier
566 parse_nested_c_variadic_type = C-variadic type `...` may not be nested inside another type
568 parse_invalid_dyn_keyword = invalid `dyn` keyword
569 .help = `dyn` is only needed at the start of a trait `+`-separated list
570 .suggestion = remove this keyword
572 parse_negative_bounds_not_supported = negative bounds are not supported
573 .label = negative bounds are not supported
574 .suggestion = {$num_bounds ->
575 [one] remove the bound
576 *[other] remove the bounds
579 parse_help_set_edition_cargo = set `edition = "{$edition}"` in `Cargo.toml`
580 parse_help_set_edition_standalone = pass `--edition {$edition}` to `rustc`
581 parse_note_edition_guide = for more on editions, read https://doc.rust-lang.org/edition-guide