@@ -71,6 +71,8 @@ parser_field_expression_with_generic = field expressions cannot have generic arg
7171parser_macro_invocation_with_qualified_path = macros cannot use qualified paths
7272
7373parser_unexpected_token_after_label = expected `while`, `for`, `loop` or `{ " { " } ` after a label
74+ .suggestion_remove_label = consider removing the label
75+ .suggestion_enclose_in_block = consider enclosing expression in a block
7476
7577parser_require_colon_after_labeled_expression = labeled expression must be followed by `:`
7678 .note = labels are used before loops and blocks, allowing e.g., `break 'label` to them
@@ -161,3 +163,209 @@ parser_use_eq_instead = unexpected `==`
161163
162164parser_use_empty_block_not_semi = expected { " `{}` " } , found `;`
163165 .suggestion = try using { " `{}` " } instead
166+
167+ parser_comparison_interpreted_as_generic =
168+ `<` is interpreted as a start of generic arguments for `{ $type } `, not a comparison
169+ .label_args = interpreted as generic arguments
170+ .label_comparison = not interpreted as comparison
171+ .suggestion = try comparing the cast value
172+
173+ parser_shift_interpreted_as_generic =
174+ `<<` is interpreted as a start of generic arguments for `{ $type } `, not a shift
175+ .label_args = interpreted as generic arguments
176+ .label_comparison = not interpreted as shift
177+ .suggestion = try shifting the cast value
178+
179+ parser_found_expr_would_be_stmt = expected expression, found `{ $token } `
180+ .label = expected expression
181+
182+ parser_leading_plus_not_supported = leading `+` is not supported
183+ .label = unexpected `+`
184+ .suggestion_remove_plus = try removing the `+`
185+
186+ parser_parentheses_with_struct_fields = invalid `struct` delimiters or `fn` call arguments
187+ .suggestion_braces_for_struct = if `{ $type } ` is a struct, use braces as delimiters
188+ .suggestion_no_fields_for_fn = if `{ $type } ` is a function, use the arguments directly
189+
190+ parser_labeled_loop_in_break = parentheses are required around this expression to avoid confusion with a labeled break expression
191+
192+ parser_sugg_wrap_expression_in_parentheses = wrap the expression in parentheses
193+
194+ parser_array_brackets_instead_of_braces = this is a block expression, not an array
195+ .suggestion = to make an array, use square brackets instead of curly braces
196+
197+ parser_match_arm_body_without_braces = `match` arm body without braces
198+ .label_statements = { $num_statements ->
199+ [ one ] this statement is not surrounded by a body
200+ *[ other ] these statements are not surrounded by a body
201+ }
202+ .label_arrow = while parsing the `match` arm starting here
203+ .suggestion_add_braces = surround the { $num_statements ->
204+ [ one ] statement
205+ *[ other ] statements
206+ } with a body
207+ .suggestion_use_comma_not_semicolon = use a comma to end a `match` arm expression
208+
209+ parser_struct_literal_not_allowed_here = struct literals are not allowed here
210+ .suggestion = surround the struct literal with parentheses
211+
212+ parser_invalid_interpolated_expression = invalid interpolated expression
213+
214+ parser_hexadecimal_float_literal_not_supported = hexadecimal float literal is not supported
215+ parser_octal_float_literal_not_supported = octal float literal is not supported
216+ parser_binary_float_literal_not_supported = binary float literal is not supported
217+ parser_not_supported = not supported
218+
219+ parser_invalid_literal_suffix = suffixes on { $kind } literals are invalid
220+ .label = invalid suffix `{ $suffix } `
221+
222+ parser_invalid_literal_suffix_on_tuple_index = suffixes on a tuple index are invalid
223+ .label = invalid suffix `{ $suffix } `
224+ .tuple_exception_line_1 = `{ $suffix } ` is *temporarily* accepted on tuple index fields as it was incorrectly accepted on stable for a few releases
225+ .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
226+ .tuple_exception_line_3 = see issue #60210 <https://github.com/rust-lang/rust/issues/60210> for more information
227+
228+ parser_non_string_abi_literal = non-string ABI literal
229+ .suggestion = specify the ABI with a string literal
230+
231+ parser_mismatched_closing_delimiter = mismatched closing delimiter: `{ $delimiter } `
232+ .label_unmatched = mismatched closing delimiter
233+ .label_opening_candidate = closing delimiter possibly meant for this
234+ .label_unclosed = unclosed delimiter
235+
236+ parser_incorrect_visibility_restriction = incorrect visibility restriction
237+ .help = some possible visibility restrictions are:
238+ `pub(crate)`: visible only on the current crate
239+ `pub(super)`: visible only in the current module's parent
240+ `pub(in path::to::module)`: visible only on the specified path
241+ .suggestion = make this visible only to module `{ $inner_str } ` with `in`
242+
243+ parser_assignment_else_not_allowed = <assignment> ... else { " { " } ... { " } " } is not allowed
244+
245+ parser_expected_statement_after_outer_attr = expected statement after outer attribute
246+
247+ parser_doc_comment_does_not_document_anything = found a documentation comment that doesn't document anything
248+ .help = doc comments must come before what they document, maybe a comment was intended with `//`?
249+ .suggestion = missing comma here
250+
251+ parser_const_let_mutually_exclusive = `const` and `let` are mutually exclusive
252+ .suggestion = remove `let`
253+
254+ parser_invalid_expression_in_let_else = a `{ $operator } ` expression cannot be directly assigned in `let...else`
255+ parser_invalid_curly_in_let_else = right curly brace `{ " } " } ` before `else` in a `let...else` statement not allowed
256+
257+ parser_compound_assignment_expression_in_let = can't reassign to an uninitialized variable
258+ .suggestion = initialize the variable
259+ .help = if you meant to overwrite, remove the `let` binding
260+
261+ parser_suffixed_literal_in_attribute = suffixed literals are not allowed in attributes
262+ .help = instead of using a suffixed literal (`1u8`, `1.0f32`, etc.), use an unsuffixed version (`1`, `1.0`, etc.)
263+
264+ parser_invalid_meta_item = expected unsuffixed literal or identifier, found `{ $token } `
265+
266+ parser_label_inner_attr_does_not_annotate_this = the inner attribute doesn't annotate this { $item }
267+ parser_sugg_change_inner_attr_to_outer = to annotate the { $item } , change the attribute from inner to outer style
268+
269+ parser_inner_attr_not_permitted_after_outer_doc_comment = an inner attribute is not permitted following an outer doc comment
270+ .label_attr = not permitted following an outer doc comment
271+ .label_prev_doc_comment = previous doc comment
272+ .label_does_not_annotate_this = { parser_label_inner_attr_does_not_annotate_this }
273+ .sugg_change_inner_to_outer = { parser_sugg_change_inner_attr_to_outer }
274+
275+ parser_inner_attr_not_permitted_after_outer_attr = an inner attribute is not permitted following an outer attribute
276+ .label_attr = not permitted following an outer attribute
277+ .label_prev_attr = previous outer attribute
278+ .label_does_not_annotate_this = { parser_label_inner_attr_does_not_annotate_this }
279+ .sugg_change_inner_to_outer = { parser_sugg_change_inner_attr_to_outer }
280+
281+ parser_inner_attr_not_permitted = an inner attribute is not permitted in this context
282+ .label_does_not_annotate_this = { parser_label_inner_attr_does_not_annotate_this }
283+ .sugg_change_inner_to_outer = { parser_sugg_change_inner_attr_to_outer }
284+
285+ parser_inner_attr_explanation = inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
286+ parser_outer_attr_explanation = outer attributes, like `#[test]`, annotate the item following them
287+
288+ parser_inner_doc_comment_not_permitted = expected outer doc comment
289+ .note = inner doc comments like this (starting with `//!` or `/*!`) can only appear before items
290+ .suggestion = you might have meant to write a regular comment
291+ .label_does_not_annotate_this = the inner doc comment doesn't annotate this { $item }
292+ .sugg_change_inner_to_outer = to annotate the { $item } , change the doc comment from inner to outer style
293+
294+ parser_expected_identifier_found_reserved_identifier_str = expected identifier, found reserved identifier `{ $token } `
295+ parser_expected_identifier_found_keyword_str = expected identifier, found keyword `{ $token } `
296+ parser_expected_identifier_found_reserved_keyword_str = expected identifier, found reserved keyword `{ $token } `
297+ parser_expected_identifier_found_doc_comment_str = expected identifier, found doc comment `{ $token } `
298+ parser_expected_identifier_found_str = expected identifier, found `{ $token } `
299+
300+ parser_expected_identifier_found_reserved_identifier = expected identifier, found reserved identifier
301+ parser_expected_identifier_found_keyword = expected identifier, found keyword
302+ parser_expected_identifier_found_reserved_keyword = expected identifier, found reserved keyword
303+ parser_expected_identifier_found_doc_comment = expected identifier, found doc comment
304+ parser_expected_identifier = expected identifier
305+
306+ parser_sugg_escape_to_use_as_identifier = escape `{ $ident_name } ` to use it as an identifier
307+
308+ parser_sugg_remove_comma = remove this comma
309+
310+ parser_expected_semi_found_reserved_identifier_str = expected `;`, found reserved identifier `{ $token } `
311+ parser_expected_semi_found_keyword_str = expected `;`, found keyword `{ $token } `
312+ parser_expected_semi_found_reserved_keyword_str = expected `;`, found reserved keyword `{ $token } `
313+ parser_expected_semi_found_doc_comment_str = expected `;`, found doc comment `{ $token } `
314+ parser_expected_semi_found_str = expected `;`, found `{ $token } `
315+
316+ parser_sugg_change_this_to_semi = change this to `;`
317+ parser_sugg_add_semi = add `;` here
318+ parser_label_unexpected_token = unexpected token
319+
320+ parser_unmatched_angle_brackets = { $num_extra_brackets ->
321+ [ one ] unmatched angle bracket
322+ *[ other ] unmatched angle brackets
323+ }
324+ .suggestion = { $num_extra_brackets ->
325+ [ one ] remove extra angle bracket
326+ *[ other ] remove extra angle brackets
327+ }
328+
329+ parser_generic_parameters_without_angle_brackets = generic parameters without surrounding angle brackets
330+ .suggestion = surround the type parameters with angle brackets
331+
332+ parser_comparison_operators_cannot_be_chained = comparison operators cannot be chained
333+ .sugg_parentheses_for_function_args = or use `(...)` if you meant to specify fn arguments
334+ .sugg_split_comparison = split the comparison into two
335+ .sugg_parenthesize = parenthesize the comparison
336+ parser_sugg_turbofish_syntax = use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
337+
338+ parser_question_mark_in_type = invalid `?` in type
339+ .label = `?` is only allowed on expressions, not types
340+ .suggestion = if you meant to express that the type might not contain a value, use the `Option` wrapper type
341+
342+ parser_unexpected_parentheses_in_for_head = unexpected parentheses surrounding `for` loop head
343+ .suggestion = remove parentheses in `for` loop
344+
345+ parser_doc_comment_on_param_type = documentation comments cannot be applied to a function parameter's type
346+ .label = doc comments are not allowed here
347+
348+ parser_attribute_on_param_type = attributes cannot be applied to a function parameter's type
349+ .label = attributes are not allowed here
350+
351+ parser_pattern_method_param_without_body = patterns aren't allowed in methods without bodies
352+ .suggestion = give this argument a name or use an underscore to ignore it
353+
354+ parser_self_param_not_first = unexpected `self` parameter in function
355+ .label = must be the first parameter of an associated function
356+
357+ parser_const_generic_without_braces = expressions must be enclosed in braces to be used as const generic arguments
358+ .suggestion = enclose the `const` expression in braces
359+
360+ parser_unexpected_const_param_declaration = unexpected `const` parameter declaration
361+ .label = expected a `const` expression, not a parameter declaration
362+ .suggestion = `const` parameters must be declared for the `impl`
363+
364+ parser_unexpected_const_in_generic_param = expected lifetime, type, or constant, found keyword `const`
365+ .suggestion = the `const` keyword is only needed in the definition of the type
366+
367+ parser_async_move_order_incorrect = the order of `move` and `async` is incorrect
368+ .suggestion = try switching the order
369+
370+ parser_double_colon_in_bound = expected `:` followed by trait or lifetime
371+ .suggestion = use single colon
0 commit comments