Migrate trivially translatable rustc_parse diagnostics

This commit is contained in:
clubby789 2023-04-27 01:53:06 +01:00
parent 1c42cb4ef0
commit 1ce9d7254e
17 changed files with 443 additions and 231 deletions

View file

@ -772,3 +772,75 @@ parse_const_bounds_missing_tilde = const bounds must start with `~`
.suggestion = add `~`
parse_underscore_literal_suffix = underscore literal suffix is not allowed
parse_expect_label_found_ident = expected a label, found an identifier
.suggestion = labels start with a tick
parse_inappropriate_default = {$article} {$descr} cannot be `default`
.label = `default` because of this
.note = only associated `fn`, `const`, and `type` items can be `default`
parse_recover_import_as_use = expected item, found {$token_name}
.suggestion = items are imported using the `use` keyword
parse_single_colon_import_path = expected `::`, found `:`
.suggestion = use double colon
.note = import paths are delimited using `::`
parse_bad_item_kind = {$descr} is not supported in {$ctx}
.help = consider moving the {$descr} out to a nearby module scope
parse_single_colon_struct_type = found single colon in a struct field type path
.suggestion = write a path separator here
parse_equals_struct_default = default values on `struct` fields aren't supported
.suggestion = remove this unsupported default value
parse_macro_rules_missing_bang = expected `!` after `macro_rules`
.suggestion = add a `!`
parse_macro_name_remove_bang = macro names aren't followed by a `!`
.suggestion = remove the `!`
parse_macro_rules_visibility = can't qualify macro_rules invocation with `{$vis}`
.suggestion = try exporting the macro
parse_macro_invocation_visibility = can't qualify macro invocation with `pub`
.suggestion = remove the visibility
.help = try adjusting the macro to put `{$vis}` inside the invocation
parse_nested_adt = `{$kw_str}` definition cannot be nested inside `{$keyword}`
.suggestion = consider creating a new `{$kw_str}` definition instead of nesting
parse_function_body_equals_expr = function body cannot be `= expression;`
.suggestion = surround the expression with `{"{"}` and `{"}"}` instead of `=` and `;`
parse_box_not_pat = expected pattern, found {$descr}
.note = `box` is a reserved keyword
.suggestion = escape `box` to use it as an identifier
parse_unmatched_angle = unmatched angle {$plural ->
[true] brackets
*[false] bracket
}
.suggestion = remove extra angle {$plural ->
[true] brackets
*[false] bracket
}
parse_missing_plus_in_bounds = expected `+` between lifetime and {$sym}
.suggestion = add `+`
parse_incorrect_braces_trait_bounds = incorrect braces around trait bounds
.suggestion = remove the parentheses
parse_kw_bad_case = keyword `{$kw}` is written in the wrong case
.suggestion = write it in the correct case
parse_meta_bad_delim = wrong meta list delimiters
parse_cfg_attr_bad_delim = wrong `cfg_attr` delimiters
parse_meta_bad_delim_suggestion = the delimiters should be `(` and `)`
parse_malformed_cfg_attr = malformed `cfg_attr` attribute input
.suggestion = missing condition and attribute
.note = for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute>