]> git.proxmox.com Git - rustc.git/blame - compiler/rustc_parse/locales/en-US.ftl
New upstream version 1.69.0+dfsg1
[rustc.git] / compiler / rustc_parse / locales / en-US.ftl
CommitLineData
487cf647
FG
1parse_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
4
9c376795
FG
5parse_struct_literal_needing_parens =
6 invalid struct literal
7 .suggestion = you might need to surround the struct literal in parentheses
8
487cf647
FG
9parse_maybe_report_ambiguous_plus =
10 ambiguous `+` in a type
11 .suggestion = use parentheses to disambiguate
12
13parse_maybe_recover_from_bad_type_plus =
14 expected a path on the left-hand side of `+`, not `{$ty}`
15
16parse_add_paren = try adding parentheses
17
18parse_forgot_paren = perhaps you forgot parentheses?
19
20parse_expect_path = expected a path
21
22parse_maybe_recover_from_bad_qpath_stage_2 =
23 missing angle brackets in associated item path
24 .suggestion = try: `{$ty}`
25
26parse_incorrect_semicolon =
27 expected item, found `;`
28 .suggestion = remove this semicolon
29 .help = {$name} declarations are not followed by a semicolon
30
31parse_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
35
36parse_in_in_typo =
37 expected iterable, found keyword `in`
38 .suggestion = remove the duplicated `in`
39
40parse_invalid_variable_declaration =
41 invalid variable declaration
42
43parse_switch_mut_let_order =
44 switch the order of `mut` and `let`
45parse_missing_let_before_mut = missing keyword
46parse_use_let_not_auto = write `let` instead of `auto` to introduce a new variable
47parse_use_let_not_var = write `let` instead of `var` to introduce a new variable
48
49parse_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`
52
53parse_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
57
58parse_tilde_is_not_unary_operator = `~` cannot be used as a unary operator
59 .suggestion = use `!` to perform bitwise not
60
61parse_unexpected_if_with_if = unexpected `if` in the condition expression
62 .suggestion = remove the `if`
63
64parse_unexpected_token_after_not = unexpected {$negated_desc} after identifier
65parse_unexpected_token_after_not_bitwise = use `!` to perform bitwise not
66parse_unexpected_token_after_not_logical = use `!` to perform logical negation
67parse_unexpected_token_after_not_default = use `!` to perform logical negation or bitwise not
68
69parse_malformed_loop_label = malformed loop label
70 .suggestion = use the correct loop label format
71
72parse_lifetime_in_borrow_expression = borrow expressions cannot be annotated with lifetimes
73 .suggestion = remove the lifetime annotation
74 .label = annotated with lifetime here
75
76parse_field_expression_with_generic = field expressions cannot have generic arguments
77
78parse_macro_invocation_with_qualified_path = macros cannot use qualified paths
79
80parse_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
83
84parse_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
86 .label = the label
87 .suggestion = add `:` after the label
88
89parse_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
92
93parse_float_literal_requires_integer_part = float literals must have an integer part
94 .suggestion = must have an integer part
95
9ffffee4
FG
96parse_invalid_int_literal_width = invalid width `{$width}` for integer literal
97 .help = valid widths are 8, 16, 32, 64 and 128
98
99parse_invalid_num_literal_base_prefix = invalid base prefix for number literal
100 .note = base prefixes (`0xff`, `0b1010`, `0o755`) are lowercase
101 .suggestion = try making the prefix lowercase
102
103parse_invalid_num_literal_suffix = invalid suffix `{$suffix}` for number literal
104 .label = invalid suffix `{$suffix}`
105 .help = the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.)
106
107parse_invalid_float_literal_width = invalid width `{$width}` for float literal
108 .help = valid widths are 32 and 64
109
110parse_invalid_float_literal_suffix = invalid suffix `{$suffix}` for float literal
111 .label = invalid suffix `{$suffix}`
112 .help = valid suffixes are `f32` and `f64`
113
114parse_int_literal_too_large = integer literal is too large
115
487cf647
FG
116parse_missing_semicolon_before_array = expected `;`, found `[`
117 .suggestion = consider adding `;` here
118
119parse_invalid_block_macro_segment = cannot use a `block` macro fragment here
120 .label = the `block` fragment is within this context
121
122parse_expect_dotdot_not_dotdotdot = expected `..`, found `...`
123 .suggestion = use `..` to fill in the rest of the fields
124
125parse_if_expression_missing_then_block = this `if` expression is missing a block after the condition
126 .add_then_block = add a block here
127 .condition_possibly_unfinished = this binary operation is possibly unfinished
128
129parse_if_expression_missing_condition = missing condition for `if` expression
130 .condition_label = expected condition here
131 .block_label = if this block is the condition of the `if` expression, then it must be followed by another block
132
133parse_expected_expression_found_let = expected expression, found `let` statement
134
135parse_expect_eq_instead_of_eqeq = expected `=`, found `==`
136 .suggestion = consider using `=` here
137
138parse_expected_else_block = expected `{"{"}`, found {$first_tok}
139 .label = expected an `if` or a block after this `else`
140 .suggestion = add an `if` if this is the condition of a chained `else if` statement
141
142parse_outer_attribute_not_allowed_on_if_else = outer attributes are not allowed on `if` and `else` branches
143 .branch_label = the attributes are attached to this branch
144 .ctx_label = the branch belongs to this `{$ctx}`
145 .suggestion = remove the attributes
146
147parse_missing_in_in_for_loop = missing `in` in `for` loop
148 .use_in_not_of = try using `in` here instead
149 .add_in = try adding `in` here
150
9ffffee4
FG
151parse_missing_expression_in_for_loop = missing expression to iterate on in `for` loop
152 .suggestion = try adding an expression to the `for` loop
153
154parse_loop_else = `{$loop_kind}...else` loops are not supported
155 .note = consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run
156 .loop_keyword = `else` is attached to this loop
157
487cf647
FG
158parse_missing_comma_after_match_arm = expected `,` following `match` arm
159 .suggestion = missing a comma here to end this `match` arm
160
161parse_catch_after_try = keyword `catch` cannot follow a `try` block
162 .help = try using `match` on the result of the `try` block instead
163
164parse_comma_after_base_struct = cannot use a comma after the base struct
165 .note = the base struct must always be the last field
166 .suggestion = remove this comma
167
168parse_eq_field_init = expected `:`, found `=`
169 .suggestion = replace equals symbol with a colon
170
171parse_dotdotdot = unexpected token: `...`
172 .suggest_exclusive_range = use `..` for an exclusive range
173 .suggest_inclusive_range = or `..=` for an inclusive range
174
175parse_left_arrow_operator = unexpected token: `<-`
176 .suggestion = if you meant to write a comparison against a negative value, add a space in between `<` and `-`
177
178parse_remove_let = expected pattern, found `let`
179 .suggestion = remove the unnecessary `let` keyword
180
181parse_use_eq_instead = unexpected `==`
182 .suggestion = try using `=` instead
183
184parse_use_empty_block_not_semi = expected { "`{}`" }, found `;`
185 .suggestion = try using { "`{}`" } instead
186
187parse_comparison_interpreted_as_generic =
188 `<` is interpreted as a start of generic arguments for `{$type}`, not a comparison
189 .label_args = interpreted as generic arguments
190 .label_comparison = not interpreted as comparison
191 .suggestion = try comparing the cast value
192
193parse_shift_interpreted_as_generic =
194 `<<` is interpreted as a start of generic arguments for `{$type}`, not a shift
195 .label_args = interpreted as generic arguments
196 .label_comparison = not interpreted as shift
197 .suggestion = try shifting the cast value
198
199parse_found_expr_would_be_stmt = expected expression, found `{$token}`
200 .label = expected expression
201
202parse_leading_plus_not_supported = leading `+` is not supported
203 .label = unexpected `+`
204 .suggestion_remove_plus = try removing the `+`
205
206parse_parentheses_with_struct_fields = invalid `struct` delimiters or `fn` call arguments
207 .suggestion_braces_for_struct = if `{$type}` is a struct, use braces as delimiters
208 .suggestion_no_fields_for_fn = if `{$type}` is a function, use the arguments directly
209
210parse_labeled_loop_in_break = parentheses are required around this expression to avoid confusion with a labeled break expression
211
212parse_sugg_wrap_expression_in_parentheses = wrap the expression in parentheses
213
214parse_array_brackets_instead_of_braces = this is a block expression, not an array
215 .suggestion = to make an array, use square brackets instead of curly braces
216
217parse_match_arm_body_without_braces = `match` arm body without braces
218 .label_statements = {$num_statements ->
219 [one] this statement is not surrounded by a body
220 *[other] these statements are not surrounded by a body
221 }
222 .label_arrow = while parsing the `match` arm starting here
223 .suggestion_add_braces = surround the {$num_statements ->
224 [one] statement
225 *[other] statements
226 } with a body
9ffffee4
FG
227 .suggestion_use_comma_not_semicolon = replace `;` with `,` to end a `match` arm expression
228
229parse_inclusive_range_extra_equals = unexpected `=` after inclusive range
230 .suggestion_remove_eq = use `..=` instead
231 .note = inclusive ranges end with a single equals sign (`..=`)
232
233parse_inclusive_range_match_arrow = unexpected `>` after inclusive range
234 .label = this is parsed as an inclusive range `..=`
235 .suggestion = add a space between the pattern and `=>`
236
237parse_inclusive_range_no_end = inclusive range with no end
238 .suggestion_open_range = use `..` instead
239 .note = inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
487cf647
FG
240
241parse_struct_literal_not_allowed_here = struct literals are not allowed here
242 .suggestion = surround the struct literal with parentheses
243
244parse_invalid_interpolated_expression = invalid interpolated expression
245
9ffffee4
FG
246parse_hexadecimal_float_literal_not_supported = hexadecimal float literal is not supported
247parse_octal_float_literal_not_supported = octal float literal is not supported
248parse_binary_float_literal_not_supported = binary float literal is not supported
249parse_not_supported = not supported
250
251parse_invalid_literal_suffix = suffixes on {$kind} literals are invalid
252 .label = invalid suffix `{$suffix}`
253
487cf647
FG
254parse_invalid_literal_suffix_on_tuple_index = suffixes on a tuple index are invalid
255 .label = invalid suffix `{$suffix}`
256 .tuple_exception_line_1 = `{$suffix}` is *temporarily* accepted on tuple index fields as it was incorrectly accepted on stable for a few releases
257 .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
258 .tuple_exception_line_3 = see issue #60210 <https://github.com/rust-lang/rust/issues/60210> for more information
259
260parse_non_string_abi_literal = non-string ABI literal
261 .suggestion = specify the ABI with a string literal
262
263parse_mismatched_closing_delimiter = mismatched closing delimiter: `{$delimiter}`
264 .label_unmatched = mismatched closing delimiter
265 .label_opening_candidate = closing delimiter possibly meant for this
266 .label_unclosed = unclosed delimiter
267
268parse_incorrect_visibility_restriction = incorrect visibility restriction
269 .help = some possible visibility restrictions are:
270 `pub(crate)`: visible only on the current crate
271 `pub(super)`: visible only in the current module's parent
272 `pub(in path::to::module)`: visible only on the specified path
273 .suggestion = make this visible only to module `{$inner_str}` with `in`
274
275parse_assignment_else_not_allowed = <assignment> ... else {"{"} ... {"}"} is not allowed
276
277parse_expected_statement_after_outer_attr = expected statement after outer attribute
278
279parse_doc_comment_does_not_document_anything = found a documentation comment that doesn't document anything
280 .help = doc comments must come before what they document, if a comment was intended use `//`
281 .suggestion = missing comma here
282
283parse_const_let_mutually_exclusive = `const` and `let` are mutually exclusive
284 .suggestion = remove `let`
285
286parse_invalid_expression_in_let_else = a `{$operator}` expression cannot be directly assigned in `let...else`
287parse_invalid_curly_in_let_else = right curly brace `{"}"}` before `else` in a `let...else` statement not allowed
9ffffee4 288parse_extra_if_in_let_else = remove the `if` if you meant to write a `let...else` statement
487cf647
FG
289
290parse_compound_assignment_expression_in_let = can't reassign to an uninitialized variable
291 .suggestion = initialize the variable
292 .help = if you meant to overwrite, remove the `let` binding
293
294parse_suffixed_literal_in_attribute = suffixed literals are not allowed in attributes
295 .help = instead of using a suffixed literal (`1u8`, `1.0f32`, etc.), use an unsuffixed version (`1`, `1.0`, etc.)
296
297parse_invalid_meta_item = expected unsuffixed literal or identifier, found `{$token}`
298
299parse_label_inner_attr_does_not_annotate_this = the inner attribute doesn't annotate this {$item}
300parse_sugg_change_inner_attr_to_outer = to annotate the {$item}, change the attribute from inner to outer style
301
302parse_inner_attr_not_permitted_after_outer_doc_comment = an inner attribute is not permitted following an outer doc comment
303 .label_attr = not permitted following an outer doc comment
304 .label_prev_doc_comment = previous doc comment
305 .label_does_not_annotate_this = {parse_label_inner_attr_does_not_annotate_this}
306 .sugg_change_inner_to_outer = {parse_sugg_change_inner_attr_to_outer}
307
308parse_inner_attr_not_permitted_after_outer_attr = an inner attribute is not permitted following an outer attribute
309 .label_attr = not permitted following an outer attribute
310 .label_prev_attr = previous outer attribute
311 .label_does_not_annotate_this = {parse_label_inner_attr_does_not_annotate_this}
312 .sugg_change_inner_to_outer = {parse_sugg_change_inner_attr_to_outer}
313
314parse_inner_attr_not_permitted = an inner attribute is not permitted in this context
315 .label_does_not_annotate_this = {parse_label_inner_attr_does_not_annotate_this}
316 .sugg_change_inner_to_outer = {parse_sugg_change_inner_attr_to_outer}
317
318parse_inner_attr_explanation = inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
319parse_outer_attr_explanation = outer attributes, like `#[test]`, annotate the item following them
320
321parse_inner_doc_comment_not_permitted = expected outer doc comment
322 .note = inner doc comments like this (starting with `//!` or `/*!`) can only appear before items
323 .suggestion = you might have meant to write a regular comment
324 .label_does_not_annotate_this = the inner doc comment doesn't annotate this {$item}
325 .sugg_change_inner_to_outer = to annotate the {$item}, change the doc comment from inner to outer style
326
327parse_expected_identifier_found_reserved_identifier_str = expected identifier, found reserved identifier `{$token}`
328parse_expected_identifier_found_keyword_str = expected identifier, found keyword `{$token}`
329parse_expected_identifier_found_reserved_keyword_str = expected identifier, found reserved keyword `{$token}`
330parse_expected_identifier_found_doc_comment_str = expected identifier, found doc comment `{$token}`
331parse_expected_identifier_found_str = expected identifier, found `{$token}`
332
333parse_expected_identifier_found_reserved_identifier = expected identifier, found reserved identifier
334parse_expected_identifier_found_keyword = expected identifier, found keyword
335parse_expected_identifier_found_reserved_keyword = expected identifier, found reserved keyword
336parse_expected_identifier_found_doc_comment = expected identifier, found doc comment
337parse_expected_identifier = expected identifier
338
339parse_sugg_escape_to_use_as_identifier = escape `{$ident_name}` to use it as an identifier
340
341parse_sugg_remove_comma = remove this comma
342
343parse_expected_semi_found_reserved_identifier_str = expected `;`, found reserved identifier `{$token}`
344parse_expected_semi_found_keyword_str = expected `;`, found keyword `{$token}`
345parse_expected_semi_found_reserved_keyword_str = expected `;`, found reserved keyword `{$token}`
346parse_expected_semi_found_doc_comment_str = expected `;`, found doc comment `{$token}`
347parse_expected_semi_found_str = expected `;`, found `{$token}`
348
349parse_sugg_change_this_to_semi = change this to `;`
350parse_sugg_add_semi = add `;` here
351parse_label_unexpected_token = unexpected token
352
353parse_unmatched_angle_brackets = {$num_extra_brackets ->
354 [one] unmatched angle bracket
355 *[other] unmatched angle brackets
356 }
357 .suggestion = {$num_extra_brackets ->
358 [one] remove extra angle bracket
359 *[other] remove extra angle brackets
360 }
361
362parse_generic_parameters_without_angle_brackets = generic parameters without surrounding angle brackets
363 .suggestion = surround the type parameters with angle brackets
364
365parse_comparison_operators_cannot_be_chained = comparison operators cannot be chained
366 .sugg_parentheses_for_function_args = or use `(...)` if you meant to specify fn arguments
367 .sugg_split_comparison = split the comparison into two
368 .sugg_parenthesize = parenthesize the comparison
369parse_sugg_turbofish_syntax = use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
370
371parse_question_mark_in_type = invalid `?` in type
372 .label = `?` is only allowed on expressions, not types
373 .suggestion = if you meant to express that the type might not contain a value, use the `Option` wrapper type
374
375parse_unexpected_parentheses_in_for_head = unexpected parentheses surrounding `for` loop head
376 .suggestion = remove parentheses in `for` loop
377
378parse_doc_comment_on_param_type = documentation comments cannot be applied to a function parameter's type
379 .label = doc comments are not allowed here
380
381parse_attribute_on_param_type = attributes cannot be applied to a function parameter's type
382 .label = attributes are not allowed here
383
384parse_pattern_method_param_without_body = patterns aren't allowed in methods without bodies
385 .suggestion = give this argument a name or use an underscore to ignore it
386
387parse_self_param_not_first = unexpected `self` parameter in function
388 .label = must be the first parameter of an associated function
389
390parse_const_generic_without_braces = expressions must be enclosed in braces to be used as const generic arguments
391 .suggestion = enclose the `const` expression in braces
392
393parse_unexpected_const_param_declaration = unexpected `const` parameter declaration
394 .label = expected a `const` expression, not a parameter declaration
395 .suggestion = `const` parameters must be declared for the `impl`
396
397parse_unexpected_const_in_generic_param = expected lifetime, type, or constant, found keyword `const`
398 .suggestion = the `const` keyword is only needed in the definition of the type
399
400parse_async_move_order_incorrect = the order of `move` and `async` is incorrect
401 .suggestion = try switching the order
402
403parse_double_colon_in_bound = expected `:` followed by trait or lifetime
404 .suggestion = use single colon
405
406parse_fn_ptr_with_generics = function pointer types may not have generic parameters
407 .suggestion = consider moving the lifetime {$arity ->
408 [one] parameter
409 *[other] parameters
410 } to {$for_param_list_exists ->
411 [true] the
412 *[false] a
413 } `for` parameter list
414
415parse_invalid_identifier_with_leading_number = expected identifier, found number literal
416 .label = identifiers cannot start with a number
9c376795
FG
417
418parse_maybe_fn_typo_with_impl = you might have meant to write `impl` instead of `fn`
419 .suggestion = replace `fn` with `impl` here
420
421parse_expected_fn_path_found_fn_keyword = expected identifier, found keyword `fn`
422 .suggestion = use `Fn` to refer to the trait
423
424parse_where_clause_before_tuple_struct_body = where clauses are not allowed before tuple struct bodies
425 .label = unexpected where clause
426 .name_label = while parsing this tuple struct
427 .body_label = the struct body
428 .suggestion = move the body before the where clause
9ffffee4
FG
429
430parse_async_fn_in_2015 = `async fn` is not permitted in Rust 2015
431 .label = to use `async fn`, switch to Rust 2018 or later
432
433parse_async_block_in_2015 = `async` blocks are only allowed in Rust 2018 or later
434
435parse_self_argument_pointer = cannot pass `self` by raw pointer
436 .label = cannot pass `self` by raw pointer
437
438parse_visibility_not_followed_by_item = visibility `{$vis}` is not followed by an item
439 .label = the visibility
440 .help = you likely meant to define an item, e.g., `{$vis} fn foo() {"{}"}`
441
442parse_default_not_followed_by_item = `default` is not followed by an item
443 .label = the `default` qualifier
444 .note = only `fn`, `const`, `type`, or `impl` items may be prefixed by `default`
445
446parse_missing_struct_for_struct_definition = missing `struct` for struct definition
447 .suggestion = add `struct` here to parse `{$ident}` as a public struct
448
449parse_missing_fn_for_function_definition = missing `fn` for function definition
450 .suggestion = add `fn` here to parse `{$ident}` as a public function
451
452parse_missing_fn_for_method_definition = missing `fn` for method definition
453 .suggestion = add `fn` here to parse `{$ident}` as a public method
454
455parse_ambiguous_missing_keyword_for_item_definition = missing `fn` or `struct` for function or struct definition
456 .suggestion = if you meant to call a macro, try
457 .help = if you meant to call a macro, remove the `pub` and add a trailing `!` after the identifier
458
459parse_missing_trait_in_trait_impl = missing trait in a trait impl
460 .suggestion_add_trait = add a trait here
461 .suggestion_remove_for = for an inherent impl, drop this `for`
462
463parse_missing_for_in_trait_impl = missing `for` in a trait impl
464 .suggestion = add `for` here
465
466parse_expected_trait_in_trait_impl_found_type = expected a trait, found type
467
468parse_non_item_in_item_list = non-item in item list
469 .suggestion_use_const_not_let = consider using `const` instead of `let` for associated const
470 .label_list_start = item list starts here
471 .label_non_item = non-item starts here
472 .label_list_end = item list ends here
473 .suggestion_remove_semicolon = consider removing this semicolon
474
475parse_bounds_not_allowed_on_trait_aliases = bounds are not allowed on trait aliases
476
477parse_trait_alias_cannot_be_auto = trait aliases cannot be `auto`
478parse_trait_alias_cannot_be_unsafe = trait aliases cannot be `unsafe`
479
480parse_associated_static_item_not_allowed = associated `static` items are not allowed
481
482parse_extern_crate_name_with_dashes = crate name using dashes are not valid in `extern crate` statements
483 .label = dash-separated idents are not valid
484 .suggestion = if the original crate name uses dashes you need to use underscores in the code
485
486parse_extern_item_cannot_be_const = extern items cannot be `const`
487 .suggestion = try using a static value
488 .note = for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
489
490parse_const_global_cannot_be_mutable = const globals cannot be mutable
491 .label = cannot be mutable
492 .suggestion = you might want to declare a static instead
493
494parse_missing_const_type = missing type for `{$kind}` item
495 .suggestion = provide a type for the item
496
497parse_enum_struct_mutually_exclusive = `enum` and `struct` are mutually exclusive
498 .suggestion = replace `enum struct` with
499
500parse_unexpected_token_after_struct_name = expected `where`, `{"{"}`, `(`, or `;` after struct name
501parse_unexpected_token_after_struct_name_found_reserved_identifier = expected `where`, `{"{"}`, `(`, or `;` after struct name, found reserved identifier `{$token}`
502parse_unexpected_token_after_struct_name_found_keyword = expected `where`, `{"{"}`, `(`, or `;` after struct name, found keyword `{$token}`
503parse_unexpected_token_after_struct_name_found_reserved_keyword = expected `where`, `{"{"}`, `(`, or `;` after struct name, found reserved keyword `{$token}`
504parse_unexpected_token_after_struct_name_found_doc_comment = expected `where`, `{"{"}`, `(`, or `;` after struct name, found doc comment `{$token}`
505parse_unexpected_token_after_struct_name_found_other = expected `where`, `{"{"}`, `(`, or `;` after struct name, found `{$token}`
506
507parse_unexpected_self_in_generic_parameters = unexpected keyword `Self` in generic parameters
508 .note = you cannot use `Self` as a generic parameter because it is reserved for associated items
509
510parse_unexpected_default_value_for_lifetime_in_generic_parameters = unexpected default lifetime parameter
511 .label = lifetime parameters cannot have default values
512
513parse_multiple_where_clauses = cannot define duplicate `where` clauses on an item
514 .label = previous `where` clause starts here
515 .suggestion = consider joining the two `where` clauses into one
516
517parse_nonterminal_expected_item_keyword = expected an item keyword
518parse_nonterminal_expected_statement = expected a statement
519parse_nonterminal_expected_ident = expected ident, found `{$token}`
520parse_nonterminal_expected_lifetime = expected a lifetime, found `{$token}`
521
522parse_or_pattern_not_allowed_in_let_binding = top-level or-patterns are not allowed in `let` bindings
523parse_or_pattern_not_allowed_in_fn_parameters = top-level or-patterns are not allowed in function parameters
524parse_sugg_remove_leading_vert_in_pattern = remove the `|`
525parse_sugg_wrap_pattern_in_parens = wrap the pattern in parentheses
526
527parse_note_pattern_alternatives_use_single_vert = alternatives in or-patterns are separated with `|`, not `||`
528
529parse_unexpected_vert_vert_before_function_parameter = unexpected `||` before function parameter
530 .suggestion = remove the `||`
531
532parse_label_while_parsing_or_pattern_here = while parsing this or-pattern starting here
533
534parse_unexpected_vert_vert_in_pattern = unexpected token `||` in pattern
535 .suggestion = use a single `|` to separate multiple alternative patterns
536
537parse_trailing_vert_not_allowed = a trailing `|` is not allowed in an or-pattern
538 .suggestion = remove the `{$token}`
539
540parse_dotdotdot_rest_pattern = unexpected `...`
541 .label = not a valid pattern
542 .suggestion = for a rest pattern, use `..` instead of `...`
543
544parse_pattern_on_wrong_side_of_at = pattern on wrong side of `@`
545 .label_pattern = pattern on the left, should be on the right
546 .label_binding = binding on the right, should be on the left
547 .suggestion = switch the order
548
549parse_expected_binding_left_of_at = left-hand side of `@` must be a binding
550 .label_lhs = interpreted as a pattern, not a binding
551 .label_rhs = also a pattern
552 .note = bindings are `x`, `mut x`, `ref x`, and `ref mut x`
553
554parse_ambiguous_range_pattern = the range pattern here has ambiguous interpretation
555 .suggestion = add parentheses to clarify the precedence
556
557parse_unexpected_lifetime_in_pattern = unexpected lifetime `{$symbol}` in pattern
558 .suggestion = remove the lifetime
559
560parse_ref_mut_order_incorrect = the order of `mut` and `ref` is incorrect
561 .suggestion = try switching the order
562
563parse_mut_on_nested_ident_pattern = `mut` must be attached to each individual binding
564 .suggestion = add `mut` to each binding
565parse_mut_on_non_ident_pattern = `mut` must be followed by a named binding
566 .suggestion = remove the `mut` prefix
567parse_note_mut_pattern_usage = `mut` may be followed by `variable` and `variable @ pattern`
568
569parse_repeated_mut_in_pattern = `mut` on a binding may not be repeated
570 .suggestion = remove the additional `mut`s
571
572parse_dot_dot_dot_range_to_pattern_not_allowed = range-to patterns with `...` are not allowed
573 .suggestion = use `..=` instead
574
575parse_enum_pattern_instead_of_identifier = expected identifier, found enum pattern
576
577parse_dot_dot_dot_for_remaining_fields = expected field pattern, found `{$token_str}`
578 .suggestion = to omit remaining fields, use `..`
579
580parse_expected_comma_after_pattern_field = expected `,`
581
582parse_return_types_use_thin_arrow = return types are denoted using `->`
583 .suggestion = use `->` instead
584
585parse_need_plus_after_trait_object_lifetime = lifetime in trait object type must be followed by `+`
586
587parse_expected_mut_or_const_in_raw_pointer_type = expected `mut` or `const` keyword in raw pointer type
588 .suggestion = add `mut` or `const` here
589
590parse_lifetime_after_mut = lifetime must precede `mut`
591 .suggestion = place the lifetime before `mut`
592
593parse_dyn_after_mut = `mut` must precede `dyn`
594 .suggestion = place `mut` before `dyn`
595
596parse_fn_pointer_cannot_be_const = an `fn` pointer type cannot be `const`
597 .label = `const` because of this
598 .suggestion = remove the `const` qualifier
599
600parse_fn_pointer_cannot_be_async = an `fn` pointer type cannot be `async`
601 .label = `async` because of this
602 .suggestion = remove the `async` qualifier
603
604parse_nested_c_variadic_type = C-variadic type `...` may not be nested inside another type
605
606parse_invalid_dyn_keyword = invalid `dyn` keyword
607 .help = `dyn` is only needed at the start of a trait `+`-separated list
608 .suggestion = remove this keyword
609
610parse_negative_bounds_not_supported = negative bounds are not supported
611 .label = negative bounds are not supported
612 .suggestion = {$num_bounds ->
613 [one] remove the bound
614 *[other] remove the bounds
615 }
616
617parse_help_set_edition_cargo = set `edition = "{$edition}"` in `Cargo.toml`
618parse_help_set_edition_standalone = pass `--edition {$edition}` to `rustc`
619parse_note_edition_guide = for more on editions, read https://doc.rust-lang.org/edition-guide
620
621parse_unexpected_token_after_dot = unexpected token: `{$actual}`
622
623parse_cannot_be_raw_ident = `{$ident}` cannot be a raw identifier
624
625parse_cr_doc_comment = bare CR not allowed in {$block ->
626 [true] block doc-comment
627 *[false] doc-comment
628}
629
630parse_no_digits_literal = no valid digits found for number
631
632parse_invalid_digit_literal = invalid digit for a base {$base} literal
633
634parse_empty_exponent_float = expected at least one digit in exponent
635
636parse_float_literal_unsupported_base = {$base} float literal is not supported
637
638parse_more_than_one_char = character literal may only contain one codepoint
639 .followed_by = this `{$chr}` is followed by the combining {$len ->
640 [one] mark
641 *[other] marks
642 } `{$escaped_marks}`
643 .non_printing = there are non-printing characters, the full sequence is `{$escaped}`
644 .consider_normalized = consider using the normalized form `{$ch}` of this character
645 .remove_non = consider removing the non-printing characters
646 .use_double_quotes = if you meant to write a {$is_byte ->
647 [true] byte string
648 *[false] `str`
649 } literal, use double quotes
650
651parse_no_brace_unicode_escape = incorrect unicode escape sequence
652 .label = {parse_no_brace_unicode_escape}
653 .use_braces = format of unicode escape sequences uses braces
654 .format_of_unicode = format of unicode escape sequences is `\u{"{...}"}`
655
656parse_invalid_unicode_escape = invalid unicode character escape
657 .label = invalid escape
658 .help = unicode escape must {$surrogate ->
659 [true] not be a surrogate
660 *[false] be at most 10FFFF
661 }
662
663parse_escape_only_char = {$byte ->
664 [true] byte
665 *[false] character
666 } constant must be escaped: `{$escaped_msg}`
667 .escape = escape the character
668
669parse_bare_cr = {$double_quotes ->
670 [true] bare CR not allowed in string, use `\r` instead
671 *[false] character constant must be escaped: `\r`
672 }
673 .escape = escape the character
674
675parse_bare_cr_in_raw_string = bare CR not allowed in raw string
676
677parse_too_short_hex_escape = numeric character escape is too short
678
679parse_invalid_char_in_escape = {parse_invalid_char_in_escape_msg}: `{$ch}`
680 .label = {parse_invalid_char_in_escape_msg}
681
682parse_invalid_char_in_escape_msg = invalid character in {$is_hex ->
683 [true] numeric character
684 *[false] unicode
685 } escape
686
687parse_out_of_range_hex_escape = out of range hex escape
688 .label = must be a character in the range [\x00-\x7f]
689
690parse_leading_underscore_unicode_escape = {parse_leading_underscore_unicode_escape_label}: `_`
691parse_leading_underscore_unicode_escape_label = invalid start of unicode escape
692
693parse_overlong_unicode_escape = overlong unicode escape
694 .label = must have at most 6 hex digits
695
696parse_unclosed_unicode_escape = unterminated unicode escape
697 .label = missing a closing `{"}"}`
698 .terminate = terminate the unicode escape
699
700parse_unicode_escape_in_byte = unicode escape in byte string
701 .label = {parse_unicode_escape_in_byte}
702 .help = unicode escape sequences cannot be used as a byte or in a byte string
703
704parse_empty_unicode_escape = empty unicode escape
705 .label = this escape must have at least 1 hex digit
706
707parse_zero_chars = empty character literal
708 .label = {parse_zero_chars}
709
710parse_lone_slash = invalid trailing slash in literal
711 .label = {parse_lone_slash}
712
713parse_unskipped_whitespace = non-ASCII whitespace symbol '{$ch}' is not skipped
714 .label = {parse_unskipped_whitespace}
715
716parse_multiple_skipped_lines = multiple lines skipped by escaped newline
717 .label = skipping everything up to and including this point
718
719parse_unknown_prefix = prefix `{$prefix}` is unknown
720 .label = unknown prefix
721 .note = prefixed identifiers and literals are reserved since Rust 2021
722 .suggestion_br = use `br` for a raw byte string
723 .suggestion_whitespace = consider inserting whitespace here
724
725parse_too_many_hashes = too many `#` symbols: raw strings may be delimited by up to 255 `#` symbols, but found {$num}
726
727parse_unknown_start_of_token = unknown start of token: {$escaped}
728 .sugg_quotes = Unicode characters '“' (Left Double Quotation Mark) and '”' (Right Double Quotation Mark) look like '{$ascii_str}' ({$ascii_name}), but are not
729 .sugg_other = Unicode character '{$ch}' ({$u_name}) looks like '{$ascii_str}' ({$ascii_name}), but it is not
730 .help_null = source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
731 .note_repeats = character appears {$repeats ->
732 [one] once more
733 *[other] {$repeats} more times
734 }