diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:06:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:06:31 +0000 |
commit | 2ff14448863ac1a1dd9533461708e29aae170c2d (patch) | |
tree | 85b9fea2bbfe3f06473cfa381eed11f273b57c5c /compiler/rustc_error_messages | |
parent | Adding debian version 1.64.0+dfsg1-1. (diff) | |
download | rustc-2ff14448863ac1a1dd9533461708e29aae170c2d.tar.xz rustc-2ff14448863ac1a1dd9533461708e29aae170c2d.zip |
Adding debian version 1.65.0+dfsg1-2.debian/1.65.0+dfsg1-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_error_messages')
27 files changed, 1758 insertions, 361 deletions
diff --git a/compiler/rustc_error_messages/locales/en-US/ast_lowering.ftl b/compiler/rustc_error_messages/locales/en-US/ast_lowering.ftl new file mode 100644 index 000000000..c45e045b4 --- /dev/null +++ b/compiler/rustc_error_messages/locales/en-US/ast_lowering.ftl @@ -0,0 +1,139 @@ +ast_lowering_generic_type_with_parentheses = + parenthesized type parameters may only be used with a `Fn` trait + .label = only `Fn` traits may use parentheses + +ast_lowering_use_angle_brackets = use angle brackets instead + +ast_lowering_invalid_abi = + invalid ABI: found `{$abi}` + .label = invalid ABI + .help = valid ABIs: {$valid_abis} + +ast_lowering_assoc_ty_parentheses = + parenthesized generic arguments cannot be used in associated type constraints + +ast_lowering_remove_parentheses = remove these parentheses + +ast_lowering_misplaced_impl_trait = + `impl Trait` only allowed in function and inherent method return types, not in {$position} + +ast_lowering_rustc_box_attribute_error = + #[rustc_box] requires precisely one argument and no other attributes are allowed + +ast_lowering_underscore_expr_lhs_assign = + in expressions, `_` can only be used on the left-hand side of an assignment + .label = `_` not allowed here + +ast_lowering_base_expression_double_dot = + base expression required after `..` + .label = add a base expression here + +ast_lowering_await_only_in_async_fn_and_blocks = + `await` is only allowed inside `async` functions and blocks + .label = only allowed inside `async` functions and blocks + +ast_lowering_this_not_async = this is not `async` + +ast_lowering_generator_too_many_parameters = + too many parameters for a generator (expected 0 or 1 parameters) + +ast_lowering_closure_cannot_be_static = closures cannot be static + +ast_lowering_async_non_move_closure_not_supported = + `async` non-`move` closures with parameters are not currently supported + .help = consider using `let` statements to manually capture variables by reference before entering an `async move` closure + +ast_lowering_functional_record_update_destructuring_assignment = + functional record updates are not allowed in destructuring assignments + .suggestion = consider removing the trailing pattern + +ast_lowering_async_generators_not_supported = + `async` generators are not yet supported + +ast_lowering_inline_asm_unsupported_target = + inline assembly is unsupported on this target + +ast_lowering_att_syntax_only_x86 = + the `att_syntax` option is only supported on x86 + +ast_lowering_abi_specified_multiple_times = + `{$prev_name}` ABI specified multiple times + .label = previously specified here + .note = these ABIs are equivalent on the current target + +ast_lowering_clobber_abi_not_supported = + `clobber_abi` is not supported on this target + +ast_lowering_invalid_abi_clobber_abi = + invalid ABI for `clobber_abi` + .note = the following ABIs are supported on this target: {$supported_abis} + +ast_lowering_invalid_register = + invalid register `{$reg}`: {$error} + +ast_lowering_invalid_register_class = + invalid register class `{$reg_class}`: {$error} + +ast_lowering_invalid_asm_template_modifier_reg_class = + invalid asm template modifier for this register class + +ast_lowering_argument = argument + +ast_lowering_template_modifier = template modifier + +ast_lowering_support_modifiers = + the `{$class_name}` register class supports the following template modifiers: {$modifiers} + +ast_lowering_does_not_support_modifiers = + the `{$class_name}` register class does not support template modifiers + +ast_lowering_invalid_asm_template_modifier_const = + asm template modifiers are not allowed for `const` arguments + +ast_lowering_invalid_asm_template_modifier_sym = + asm template modifiers are not allowed for `sym` arguments + +ast_lowering_register_class_only_clobber = + register class `{$reg_class_name}` can only be used as a clobber, not as an input or output + +ast_lowering_register_conflict = + register `{$reg1_name}` conflicts with register `{$reg2_name}` + .help = use `lateout` instead of `out` to avoid conflict + +ast_lowering_register1 = register `{$reg1_name}` + +ast_lowering_register2 = register `{$reg2_name}` + +ast_lowering_sub_tuple_binding = + `{$ident_name} @` is not allowed in a {$ctx} + .label = this is only allowed in slice patterns + .help = remove this and bind each tuple field independently + +ast_lowering_sub_tuple_binding_suggestion = if you don't need to use the contents of {$ident}, discard the tuple's remaining fields + +ast_lowering_extra_double_dot = + `..` can only be used once per {$ctx} pattern + .label = can only be used once per {$ctx} pattern + +ast_lowering_previously_used_here = previously used here + +ast_lowering_misplaced_double_dot = + `..` patterns are not allowed here + .note = only allowed in tuple, tuple struct, and slice patterns + +ast_lowering_misplaced_relax_trait_bound = + `?Trait` bounds are only permitted at the point where a type parameter is declared + +ast_lowering_not_supported_for_lifetime_binder_async_closure = + `for<...>` binders on `async` closures are not currently supported + +ast_lowering_arbitrary_expression_in_pattern = + arbitrary expressions aren't allowed in patterns + +ast_lowering_inclusive_range_with_no_end = inclusive range with no end + +ast_lowering_trait_fn_async = + functions in traits cannot be declared `async` + .label = `async` because of this + .note = `async` trait functions are not currently supported + .note2 = consider using the `async-trait` crate: https://crates.io/crates/async-trait diff --git a/compiler/rustc_error_messages/locales/en-US/ast_passes.ftl b/compiler/rustc_error_messages/locales/en-US/ast_passes.ftl new file mode 100644 index 000000000..e5cd1142b --- /dev/null +++ b/compiler/rustc_error_messages/locales/en-US/ast_passes.ftl @@ -0,0 +1,91 @@ +ast_passes_forbidden_let = + `let` expressions are not supported here + .note = only supported directly in conditions of `if` and `while` expressions + .not_supported_or = `||` operators are not supported in let chain expressions + .not_supported_parentheses = `let`s wrapped in parentheses are not supported in a context with let chains + +ast_passes_forbidden_let_stable = + expected expression, found statement (`let`) + .note = variable declaration using `let` is a statement + +ast_passes_deprecated_where_clause_location = + where clause not allowed here + +ast_passes_forbidden_assoc_constraint = + associated type bounds are not allowed within structs, enums, or unions + +ast_passes_keyword_lifetime = + lifetimes cannot use keyword names + +ast_passes_invalid_label = + invalid label name `{$name}` + +ast_passes_invalid_visibility = + unnecessary visibility qualifier + .implied = `pub` not permitted here because it's implied + .individual_impl_items = place qualifiers on individual impl items instead + .individual_foreign_items = place qualifiers on individual foreign items instead + +ast_passes_trait_fn_const = + functions in traits cannot be declared const + .label = functions in traits cannot be const + +ast_passes_forbidden_lifetime_bound = + lifetime bounds cannot be used in this context + +ast_passes_forbidden_non_lifetime_param = + only lifetime parameters can be used in this context + +ast_passes_fn_param_too_many = + function can not have more than {$max_num_args} arguments + +ast_passes_fn_param_c_var_args_only = + C-variadic function must be declared with at least one named argument + +ast_passes_fn_param_c_var_args_not_last = + `...` must be the last argument of a C-variadic function + +ast_passes_fn_param_doc_comment = + documentation comments cannot be applied to function parameters + .label = doc comments are not allowed here + +ast_passes_fn_param_forbidden_attr = + allow, cfg, cfg_attr, deny, expect, forbid, and warn are the only allowed built-in attributes in function parameters + +ast_passes_fn_param_forbidden_self = + `self` parameter is only allowed in associated functions + .label = not semantically valid as function parameter + .note = associated functions are those in `impl` or `trait` definitions + +ast_passes_forbidden_default = + `default` is only allowed on items in trait impls + .label = `default` because of this + +ast_passes_assoc_const_without_body = + associated constant in `impl` without body + .suggestion = provide a definition for the constant + +ast_passes_assoc_fn_without_body = + associated function in `impl` without body + .suggestion = provide a definition for the function + +ast_passes_assoc_type_without_body = + associated type in `impl` without body + .suggestion = provide a definition for the type + +ast_passes_const_without_body = + free constant item without body + .suggestion = provide a definition for the constant + +ast_passes_static_without_body = + free static item without body + .suggestion = provide a definition for the static + +ast_passes_ty_alias_without_body = + free type alias without body + .suggestion = provide a definition for the type + +ast_passes_fn_without_body = + free function without a body + .suggestion = provide a definition for the function + .extern_block_suggestion = if you meant to declare an externally defined function, use an `extern` block diff --git a/compiler/rustc_error_messages/locales/en-US/attr.ftl b/compiler/rustc_error_messages/locales/en-US/attr.ftl new file mode 100644 index 000000000..a7f8c993d --- /dev/null +++ b/compiler/rustc_error_messages/locales/en-US/attr.ftl @@ -0,0 +1,107 @@ +attr_expected_one_cfg_pattern = + expected 1 cfg-pattern + +attr_invalid_predicate = + invalid predicate `{$predicate}` + +attr_multiple_item = + multiple '{$item}' items + +attr_incorrect_meta_item = + incorrect meta item + +attr_unknown_meta_item = + unknown meta item '{$item}' + .label = expected one of {$expected} + +attr_missing_since = + missing 'since' + +attr_missing_note = + missing 'note' + +attr_multiple_stability_levels = + multiple stability levels + +attr_invalid_issue_string = + `issue` must be a non-zero numeric string or "none" + .must_not_be_zero = `issue` must not be "0", use "none" instead + .empty = cannot parse integer from empty string + .invalid_digit = invalid digit found in string + .pos_overflow = number too large to fit in target type + .neg_overflow = number too small to fit in target type + +attr_missing_feature = + missing 'feature' + +attr_non_ident_feature = + 'feature' is not an identifier + +attr_missing_issue = + missing 'issue' + +attr_incorrect_repr_format_packed_one_or_zero_arg = + incorrect `repr(packed)` attribute format: `packed` takes exactly one parenthesized argument, or no parentheses at all + +attr_invalid_repr_hint_no_paren = + invalid representation hint: `{$name}` does not take a parenthesized argument list + +attr_invalid_repr_hint_no_value = + invalid representation hint: `{$name}` does not take a value + +attr_unsupported_literal_generic = + unsupported literal +attr_unsupported_literal_cfg_string = + literal in `cfg` predicate value must be a string +attr_unsupported_literal_deprecated_string = + literal in `deprecated` value must be a string +attr_unsupported_literal_deprecated_kv_pair = + item in `deprecated` must be a key/value pair +attr_unsupported_literal_suggestion = + consider removing the prefix + +attr_invalid_repr_align_need_arg = + invalid `repr(align)` attribute: `align` needs an argument + .suggestion = supply an argument here + +attr_invalid_repr_generic = + invalid `repr({$repr_arg})` attribute: {$error_part} + +attr_incorrect_repr_format_align_one_arg = + incorrect `repr(align)` attribute format: `align` takes exactly one argument in parentheses + +attr_incorrect_repr_format_generic = + incorrect `repr({$repr_arg})` attribute format + .suggestion = use parentheses instead + +attr_rustc_promotable_pairing = + `rustc_promotable` attribute must be paired with either a `rustc_const_unstable` or a `rustc_const_stable` attribute + +attr_rustc_allowed_unstable_pairing = + `rustc_allowed_through_unstable_modules` attribute must be paired with a `stable` attribute + +attr_cfg_predicate_identifier = + `cfg` predicate key must be an identifier + +attr_deprecated_item_suggestion = + suggestions on deprecated items are unstable + .help = add `#![feature(deprecated_suggestion)]` to the crate root + .note = see #94785 for more details + +attr_expected_single_version_literal = + expected single version literal + +attr_expected_version_literal = + expected a version literal + +attr_expects_feature_list = + `{$name}` expects a list of feature names + +attr_expects_features = + `{$name}` expects feature names + +attr_soft_no_args = + `soft` should not have any arguments + +attr_unknown_version_literal = + unknown version literal format, assuming it refers to a future version diff --git a/compiler/rustc_error_messages/locales/en-US/borrowck.ftl b/compiler/rustc_error_messages/locales/en-US/borrowck.ftl index 645673ef4..67f2156f3 100644 --- a/compiler/rustc_error_messages/locales/en-US/borrowck.ftl +++ b/compiler/rustc_error_messages/locales/en-US/borrowck.ftl @@ -1,18 +1,60 @@ -borrowck-move-unsized = +borrowck_move_unsized = cannot move a value of type `{$ty}` .label = the size of `{$ty}` cannot be statically determined -borrowck-higher-ranked-lifetime-error = +borrowck_higher_ranked_lifetime_error = higher-ranked lifetime error -borrowck-could-not-prove = +borrowck_could_not_prove = could not prove `{$predicate}` -borrowck-could-not-normalize = +borrowck_could_not_normalize = could not normalize `{$value}` -borrowck-higher-ranked-subtype-error = +borrowck_higher_ranked_subtype_error = higher-ranked subtype error - -generic-does-not-live-long-enough = - `{$kind}` does not live long enough
\ No newline at end of file + +borrowck_generic_does_not_live_long_enough = + `{$kind}` does not live long enough + +borrowck_move_borrowed = + cannot move out of `{$desc}` beacause it is borrowed + +borrowck_var_does_not_need_mut = + variable does not need to be mutable + .suggestion = remove this `mut` + +borrowck_const_not_used_in_type_alias = + const parameter `{$ct}` is part of concrete type but not used in parameter list for the `impl Trait` type alias + +borrowck_var_cannot_escape_closure = + captured variable cannot escape `FnMut` closure body + .note = `FnMut` closures only have access to their captured variables while they are executing... + .cannot_escape = ...therefore, they cannot allow references to captured variables to escape + +borrowck_var_here_defined = variable defined here + +borrowck_var_here_captured = variable captured here + +borrowck_closure_inferred_mut = inferred to be a `FnMut` closure + +borrowck_returned_closure_escaped = + returns a closure that contains a reference to a captured variable, which then escapes the closure body + +borrowck_returned_async_block_escaped = + returns an `async` block that contains a reference to a captured variable, which then escapes the closure body + +borrowck_returned_ref_escaped = + returns a reference to a captured variable which escapes the closure body + +borrowck_lifetime_constraints_error = + lifetime may not live long enough + +borrowck_returned_lifetime_wrong = + {$mir_def_name} was supposed to return data with lifetime `{$outlived_fr_name}` but it is returning data with lifetime `{$fr_name}` + +borrowck_returned_lifetime_short = + {$category_desc}requires that `{$free_region_name}` must outlive `{$outlived_fr_name}` + +borrowck_used_impl_require_static = + the used `impl` has a `'static` requirement diff --git a/compiler/rustc_error_messages/locales/en-US/builtin_macros.ftl b/compiler/rustc_error_messages/locales/en-US/builtin_macros.ftl index 1d3e33c81..4d088e27b 100644 --- a/compiler/rustc_error_messages/locales/en-US/builtin_macros.ftl +++ b/compiler/rustc_error_messages/locales/en-US/builtin_macros.ftl @@ -1,5 +1,5 @@ -builtin-macros-requires-cfg-pattern = +builtin_macros_requires_cfg_pattern = macro requires a cfg-pattern as an argument .label = cfg-pattern required -builtin-macros-expected-one-cfg-pattern = expected 1 cfg-pattern +builtin_macros_expected_one_cfg_pattern = expected 1 cfg-pattern diff --git a/compiler/rustc_error_messages/locales/en-US/const_eval.ftl b/compiler/rustc_error_messages/locales/en-US/const_eval.ftl index 3f2ff8610..33bb116d6 100644 --- a/compiler/rustc_error_messages/locales/en-US/const_eval.ftl +++ b/compiler/rustc_error_messages/locales/en-US/const_eval.ftl @@ -1,31 +1,83 @@ -const-eval-unstable-in-stable = +const_eval_unstable_in_stable = const-stable function cannot use `#[feature({$gate})]` - .unstable-sugg = if it is not part of the public API, make this function unstably const - .bypass-sugg = otherwise `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks + .unstable_sugg = if it is not part of the public API, make this function unstably const + .bypass_sugg = otherwise `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks -const-eval-thread-local-access = +const_eval_thread_local_access = thread-local statics cannot be accessed at compile-time -const-eval-static-access = +const_eval_static_access = {$kind}s cannot refer to statics .help = consider extracting the value of the `static` to a `const`, and referring to that - .teach-note = `static` and `const` variables can refer to other `const` variables. A `const` variable, however, cannot refer to a `static` variable. - .teach-help = To fix this, the value can be extracted to a `const` and then used. + .teach_note = `static` and `const` variables can refer to other `const` variables. A `const` variable, however, cannot refer to a `static` variable. + .teach_help = To fix this, the value can be extracted to a `const` and then used. -const-eval-raw-ptr-to-int = +const_eval_raw_ptr_to_int = pointers cannot be cast to integers during const eval .note = at compile-time, pointers do not have an integer value .note2 = avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior -const-eval-raw-ptr-comparison = +const_eval_raw_ptr_comparison = pointers cannot be reliably compared during const eval .note = see issue #53020 <https://github.com/rust-lang/rust/issues/53020> for more information -const-eval-panic-non-str = argument to `panic!()` in a const context must have type `&str` +const_eval_panic_non_str = argument to `panic!()` in a const context must have type `&str` -const-eval-mut-deref = +const_eval_mut_deref = mutation through a reference is not allowed in {$kind}s -const-eval-transient-mut-borrow = mutable references are not allowed in {$kind}s +const_eval_transient_mut_borrow = mutable references are not allowed in {$kind}s -const-eval-transient-mut-borrow-raw = raw mutable references are not allowed in {$kind}s +const_eval_transient_mut_borrow_raw = raw mutable references are not allowed in {$kind}s + +const_eval_max_num_nodes_in_const = maximum number of nodes exceeded in constant {$global_const_id} + +const_eval_unallowed_fn_pointer_call = function pointer calls are not allowed in {$kind}s + +const_eval_unstable_const_fn = `{$def_path}` is not yet stable as a const fn + +const_eval_unallowed_mutable_refs = + mutable references are not allowed in the final value of {$kind}s + .teach_note = + References in statics and constants may only refer to immutable values.\n\n + Statics are shared everywhere, and if they refer to mutable data one might violate memory + safety since holding multiple mutable references to shared data is not allowed.\n\n + If you really want global mutable state, try using static mut or a global UnsafeCell. + +const_eval_unallowed_mutable_refs_raw = + raw mutable references are not allowed in the final value of {$kind}s + .teach_note = + References in statics and constants may only refer to immutable values.\n\n + Statics are shared everywhere, and if they refer to mutable data one might violate memory + safety since holding multiple mutable references to shared data is not allowed.\n\n + If you really want global mutable state, try using static mut or a global UnsafeCell. + +const_eval_non_const_fmt_macro_call = + cannot call non-const formatting macro in {$kind}s + +const_eval_non_const_fn_call = + cannot call non-const fn `{$def_path_str}` in {$kind}s + +const_eval_unallowed_op_in_const_context = + {$msg} + +const_eval_unallowed_heap_allocations = + allocations are not allowed in {$kind}s + .label = allocation not allowed in {$kind}s + .teach_note = + The value of statics and constants must be known at compile time, and they live for the entire lifetime of a program. Creating a boxed value allocates memory on the heap at runtime, and therefore cannot be done at compile time. + +const_eval_unallowed_inline_asm = + inline assembly is not allowed in {$kind}s + +const_eval_interior_mutable_data_refer = + {$kind}s cannot refer to interior mutable data + .label = this borrow of an interior mutable value may end up in the final value + .help = to fix this, the value can be extracted to a separate `static` item and then referenced + .teach_note = + A constant containing interior mutable data behind a reference can allow you to modify that data. + This would make multiple uses of a constant to be able to see different values and allow circumventing + the `Send` and `Sync` requirements for shared mutable data, which is unsound. + +const_eval_interior_mutability_borrow = + cannot borrow here, since the borrowed element may contain interior mutability diff --git a/compiler/rustc_error_messages/locales/en-US/driver.ftl b/compiler/rustc_error_messages/locales/en-US/driver.ftl new file mode 100644 index 000000000..8ad198c86 --- /dev/null +++ b/compiler/rustc_error_messages/locales/en-US/driver.ftl @@ -0,0 +1,13 @@ +driver_rlink_unable_to_read = failed to read rlink file: `{$err}` + +driver_rlink_wrong_file_type = The input does not look like a .rlink file + +driver_rlink_empty_version_number = The input does not contain version number + +driver_rlink_encoding_version_mismatch = .rlink file was produced with encoding version `{$version_array}`, but the current version is `{$rlink_version}` + +driver_rlink_rustc_version_mismatch = .rlink file was produced by rustc version `{$rustc_version}`, but the current version is `{$current_version}` + +driver_rlink_no_a_file = rlink must be a file + +driver_unpretty_dump_fail = pretty-print failed to write `{$path}` due to error `{$err}` diff --git a/compiler/rustc_error_messages/locales/en-US/expand.ftl b/compiler/rustc_error_messages/locales/en-US/expand.ftl index 8d506a3ea..572059115 100644 --- a/compiler/rustc_error_messages/locales/en-US/expand.ftl +++ b/compiler/rustc_error_messages/locales/en-US/expand.ftl @@ -1,5 +1,22 @@ -expand-explain-doc-comment-outer = +expand_explain_doc_comment_outer = outer doc comments expand to `#[doc = "..."]`, which is what this macro attempted to match -expand-explain-doc-comment-inner = +expand_explain_doc_comment_inner = inner doc comments expand to `#![doc = "..."]`, which is what this macro attempted to match + +expand_expr_repeat_no_syntax_vars = + attempted to repeat an expression containing no syntax variables matched as repeating at this depth + +expand_must_repeat_once = + this must repeat at least once + +expand_count_repetition_misplaced = + `count` can not be placed inside the inner-most repetition + +expand_meta_var_expr_unrecognized_var = + variable `{$key}` is not recognized in meta-variable expression + +expand_var_still_repeating = + variable '{$ident}' is still repeating at this depth + +expand_meta_var_dif_seq_matchers = {$msg} diff --git a/compiler/rustc_error_messages/locales/en-US/infer.ftl b/compiler/rustc_error_messages/locales/en-US/infer.ftl new file mode 100644 index 000000000..65371a285 --- /dev/null +++ b/compiler/rustc_error_messages/locales/en-US/infer.ftl @@ -0,0 +1,171 @@ +infer_opaque_hidden_type = + opaque type's hidden type cannot be another opaque type from the same scope + .label = one of the two opaque types used here has to be outside its defining scope + .opaque_type = opaque type whose hidden type is being assigned + .hidden_type = opaque type being used as hidden type + +infer_type_annotations_needed = {$source_kind -> + [closure] type annotations needed for the closure `{$source_name}` + [normal] type annotations needed for `{$source_name}` + *[other] type annotations needed +} + .label = type must be known at this point + +infer_label_bad = {$bad_kind -> + *[other] cannot infer type + [more_info] cannot infer {$prefix_kind -> + *[type] type for {$prefix} + [const_with_param] the value of const parameter + [const] the value of the constant + } `{$name}`{$has_parent -> + [true] {" "}declared on the {$parent_prefix} `{$parent_name}` + *[false] {""} + } +} + +infer_source_kind_subdiag_let = {$kind -> + [with_pattern] consider giving `{$name}` an explicit type + [closure] consider giving this closure parameter an explicit type + *[other] consider giving this pattern a type +}{$x_kind -> + [has_name] , where the {$prefix_kind -> + *[type] type for {$prefix} + [const_with_param] the value of const parameter + [const] the value of the constant + } `{$arg_name}` is specified + [underscore] , where the placeholders `_` are specified + *[empty] {""} +} + +infer_source_kind_subdiag_generic_label = + cannot infer {$is_type -> + [true] type + *[false] the value + } of the {$is_type -> + [true] type + *[false] const + } {$parent_exists -> + [true] parameter `{$param_name}` declared on the {$parent_prefix} `{$parent_name}` + *[false] parameter {$param_name} + } + +infer_source_kind_subdiag_generic_suggestion = + consider specifying the generic {$arg_count -> + [one] argument + *[other] arguments + } + +infer_source_kind_fully_qualified = + try using a fully qualified path to specify the expected types + +infer_source_kind_closure_return = + try giving this closure an explicit return type + +# generator_kind may need to be translated +infer_need_type_info_in_generator = + type inside {$generator_kind -> + [async_block] `async` block + [async_closure] `async` closure + [async_fn] `async fn` body + *[generator] generator + } must be known in this context + + +infer_subtype = ...so that the {$requirement -> + [method_compat] method type is compatible with trait + [type_compat] associated type is compatible with trait + [const_compat] const is compatible with trait + [expr_assignable] expression is assignable + [if_else_different] `if` and `else` have incompatible types + [no_else] `if` missing an `else` returns `()` + [fn_main_correct_type] `main` function has the correct type + [fn_start_correct_type] #[start]` function has the correct type + [intristic_correct_type] intrinsic has the correct type + [method_correct_type] method receiver has the correct type + *[other] types are compatible +} +infer_subtype_2 = ...so that {$requirement -> + [method_compat] method type is compatible with trait + [type_compat] associated type is compatible with trait + [const_compat] const is compatible with trait + [expr_assignable] expression is assignable + [if_else_different] `if` and `else` have incompatible types + [no_else] `if` missing an `else` returns `()` + [fn_main_correct_type] `main` function has the correct type + [fn_start_correct_type] #[start]` function has the correct type + [intristic_correct_type] intrinsic has the correct type + [method_correct_type] method receiver has the correct type + *[other] types are compatible +} + +infer_reborrow = ...so that reference does not outlive borrowed content +infer_reborrow_upvar = ...so that closure can access `{$name}` +infer_relate_object_bound = ...so that it can be closed over into an object +infer_data_borrowed = ...so that the type `{$name}` is not borrowed for too long +infer_reference_outlives_referent = ...so that the reference type `{$name}` does not outlive the data it points at +infer_relate_param_bound = ...so that the type `{$name}` will meet its required lifetime bounds{$continues -> + [true] ... + *[false] {""} +} +infer_relate_param_bound_2 = ...that is required by this bound +infer_relate_region_param_bound = ...so that the declared lifetime parameter bounds are satisfied +infer_compare_impl_item_obligation = ...so that the definition in impl matches the definition from the trait +infer_ascribe_user_type_prove_predicate = ...so that the where clause holds + +infer_nothing = {""} + +infer_lifetime_mismatch = lifetime mismatch + +infer_declared_different = this parameter and the return type are declared with different lifetimes... +infer_data_returned = ...but data{$label_var1_exists -> + [true] {" "}from `{$label_var1}` + *[false] {""} +} is returned here + +infer_data_lifetime_flow = ...but data with one lifetime flows into the other here +infer_declared_multiple = this type is declared with multiple lifetimes... +infer_types_declared_different = these two types are declared with different lifetimes... +infer_data_flows = ...but data{$label_var1_exists -> + [true] -> {" "}from `{$label_var1}` + *[false] -> {""} +} flows{$label_var2_exists -> + [true] -> {" "}into `{$label_var2}` + *[false] -> {""} +} here + +infer_lifetime_param_suggestion = consider introducing a named lifetime parameter{$is_impl -> + [true] {" "}and update trait if needed + *[false] {""} +} +infer_lifetime_param_suggestion_elided = each elided lifetime in input position becomes a distinct lifetime + +infer_region_explanation = {$pref_kind -> + *[should_not_happen] [{$pref_kind}] + [empty] {""} +}{$pref_kind -> + [empty] {""} + *[other] {" "} +}{$desc_kind -> + *[should_not_happen] [{$desc_kind}] + [restatic] the static lifetime + [reempty] the empty lifetime + [reemptyuni] the empty lifetime in universe {$desc_arg} + [revar] lifetime {$desc_arg} + + [as_defined] the lifetime `{$desc_arg}` as defined here + [as_defined_anon] the anonymous lifetime as defined here + [defined_here] the anonymous lifetime defined here + [anon_num_here] the anonymous lifetime #{$desc_num_arg} defined here + [defined_here_reg] the lifetime `{$desc_arg}` as defined here +}{$suff_kind -> + *[should_not_happen] [{$suff_kind}] + [empty]{""} + [continues] ... +} + +infer_mismatched_static_lifetime = incompatible lifetime on type +infer_msl_impl_note = ...does not necessarily outlive the static lifetime introduced by the compatible `impl` +infer_msl_introduces_static = introduces a `'static` lifetime requirement +infer_msl_unmet_req = because this has an unmet lifetime requirement +infer_msl_trait_note = this has an implicit `'static` lifetime requirement +infer_msl_trait_sugg = consider relaxing the implicit `'static` requirement diff --git a/compiler/rustc_error_messages/locales/en-US/interface.ftl b/compiler/rustc_error_messages/locales/en-US/interface.ftl new file mode 100644 index 000000000..bbcb8fc28 --- /dev/null +++ b/compiler/rustc_error_messages/locales/en-US/interface.ftl @@ -0,0 +1,43 @@ +interface_ferris_identifier = + Ferris cannot be used as an identifier + .suggestion = try using their name instead + +interface_emoji_identifier = + identifiers cannot contain emoji: `{$ident}` + +interface_mixed_bin_crate = + cannot mix `bin` crate type with others + +interface_mixed_proc_macro_crate = + cannot mix `proc-macro` crate type with others + +interface_proc_macro_doc_without_arg = + Trying to document proc macro crate without passing '--crate-type proc-macro to rustdoc + .warn = The generated documentation may be incorrect + +interface_error_writing_dependencies = + error writing dependencies to `{$path}`: {$error} + +interface_input_file_would_be_overwritten = + the input file "{$path}" would be overwritten by the generated executable + +interface_generated_file_conflicts_with_directory = + the generated executable for the input file "{$input_path}" conflicts with the existing directory "{$dir_path}" + +interface_temps_dir_error = + failed to find or create the directory specified by `--temps-dir` + +interface_out_dir_error = + failed to find or create the directory specified by `--out-dir` + +interface_cant_emit_mir = + could not emit MIR: {$error} + +interface_rustc_error_fatal = + fatal error triggered by #[rustc_error] + +interface_rustc_error_unexpected_annotation = + unexpected annotation used with `#[rustc_error(...)]! + +interface_failed_writing_file = + failed to write file {$path}: {$error}" diff --git a/compiler/rustc_error_messages/locales/en-US/lint.ftl b/compiler/rustc_error_messages/locales/en-US/lint.ftl index 55e96e58e..7f9918e4f 100644 --- a/compiler/rustc_error_messages/locales/en-US/lint.ftl +++ b/compiler/rustc_error_messages/locales/en-US/lint.ftl @@ -1,22 +1,22 @@ -lint-array-into-iter = +lint_array_into_iter = this method call resolves to `<&{$target} as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <{$target} as IntoIterator>::into_iter in Rust 2021 - .use-iter-suggestion = use `.iter()` instead of `.into_iter()` to avoid ambiguity - .remove-into-iter-suggestion = or remove `.into_iter()` to iterate by value - .use-explicit-into-iter-suggestion = + .use_iter_suggestion = use `.iter()` instead of `.into_iter()` to avoid ambiguity + .remove_into_iter_suggestion = or remove `.into_iter()` to iterate by value + .use_explicit_into_iter_suggestion = or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value -lint-enum-intrinsics-mem-discriminant = +lint_enum_intrinsics_mem_discriminant = the return value of `mem::discriminant` is unspecified when called with a non-enum type .note = the argument to `discriminant` should be a reference to an enum, but it was passed a reference to a `{$ty_param}`, which is not an enum. -lint-enum-intrinsics-mem-variant = +lint_enum_intrinsics_mem_variant = the return value of `mem::variant_count` is unspecified when called with a non-enum type .note = the type parameter of `variant_count` should be an enum, but it was instantiated with the type `{$ty_param}`, which is not an enum. -lint-expectation = this lint expectation is unfulfilled +lint_expectation = this lint expectation is unfulfilled .note = the `unfulfilled_lint_expectations` lint can't be expected and will always produce this message -lint-hidden-unicode-codepoints = unicode codepoint changing visible direction of text present in {$label} +lint_hidden_unicode_codepoints = unicode codepoint changing visible direction of text present in {$label} .label = this {$label} contains {$count -> [one] an invisible *[other] invisible @@ -25,68 +25,68 @@ lint-hidden-unicode-codepoints = unicode codepoint changing visible direction of *[other] codepoints } .note = these kind of unicode codepoints change the way text flows on applications that support them, but can cause confusion because they change the order of characters on the screen - .suggestion-remove = if their presence wasn't intentional, you can remove them - .suggestion-escape = if you want to keep them but make them visible in your source code, you can escape them - .no-suggestion-note-escape = if you want to keep them but make them visible in your source code, you can escape them: {$escaped} + .suggestion_remove = if their presence wasn't intentional, you can remove them + .suggestion_escape = if you want to keep them but make them visible in your source code, you can escape them + .no_suggestion_note_escape = if you want to keep them but make them visible in your source code, you can escape them: {$escaped} -lint-default-hash-types = prefer `{$preferred}` over `{$used}`, it has better performance +lint_default_hash_types = prefer `{$preferred}` over `{$used}`, it has better performance .note = a `use rustc_data_structures::fx::{$preferred}` may be necessary -lint-query-instability = using `{$query}` can result in unstable query results +lint_query_instability = using `{$query}` can result in unstable query results .note = if you believe this case to be fine, allow this lint and add a comment explaining your rationale -lint-tykind-kind = usage of `ty::TyKind::<kind>` +lint_tykind_kind = usage of `ty::TyKind::<kind>` .suggestion = try using `ty::<kind>` directly -lint-tykind = usage of `ty::TyKind` +lint_tykind = usage of `ty::TyKind` .help = try using `Ty` instead -lint-ty-qualified = usage of qualified `ty::{$ty}` +lint_ty_qualified = usage of qualified `ty::{$ty}` .suggestion = try importing it and using it unqualified -lint-lintpass-by-hand = implementing `LintPass` by hand +lint_lintpass_by_hand = implementing `LintPass` by hand .help = try using `declare_lint_pass!` or `impl_lint_pass!` instead -lint-non-existant-doc-keyword = found non-existing keyword `{$keyword}` used in `#[doc(keyword = \"...\")]` +lint_non_existant_doc_keyword = found non-existing keyword `{$keyword}` used in `#[doc(keyword = \"...\")]` .help = only existing keywords are allowed in core/std -lint-diag-out-of-impl = +lint_diag_out_of_impl = diagnostics should only be created in `SessionDiagnostic`/`AddSubdiagnostic` impls -lint-untranslatable-diag = diagnostics should be created using translatable messages +lint_untranslatable_diag = diagnostics should be created using translatable messages -lint-cstring-ptr = getting the inner pointer of a temporary `CString` - .as-ptr-label = this pointer will be invalid - .unwrap-label = this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime +lint_cstring_ptr = getting the inner pointer of a temporary `CString` + .as_ptr_label = this pointer will be invalid + .unwrap_label = this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime .note = pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned .help = for more information, see https://doc.rust-lang.org/reference/destructors.html -lint-identifier-non-ascii-char = identifier contains non-ASCII characters +lint_identifier_non_ascii_char = identifier contains non-ASCII characters -lint-identifier-uncommon-codepoints = identifier contains uncommon Unicode codepoints +lint_identifier_uncommon_codepoints = identifier contains uncommon Unicode codepoints -lint-confusable-identifier-pair = identifier pair considered confusable between `{$existing_sym}` and `{$sym}` +lint_confusable_identifier_pair = identifier pair considered confusable between `{$existing_sym}` and `{$sym}` .label = this is where the previous identifier occurred -lint-mixed-script-confusables = +lint_mixed_script_confusables = the usage of Script Group `{$set}` in this crate consists solely of mixed script confusables - .includes-note = the usage includes {$includes} + .includes_note = the usage includes {$includes} .note = please recheck to make sure their usages are indeed what you want -lint-non-fmt-panic = panic message is not a string literal +lint_non_fmt_panic = panic message is not a string literal .note = this usage of `{$name}!()` is deprecated; it will be a hard error in Rust 2021 - .more-info-note = for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> - .supports-fmt-note = the `{$name}!()` macro supports formatting, so there's no need for the `format!()` macro here - .supports-fmt-suggestion = remove the `format!(..)` macro call - .display-suggestion = add a "{"{"}{"}"}" format string to `Display` the message - .debug-suggestion = + .more_info_note = for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html> + .supports_fmt_note = the `{$name}!()` macro supports formatting, so there's no need for the `format!()` macro here + .supports_fmt_suggestion = remove the `format!(..)` macro call + .display_suggestion = add a "{"{"}{"}"}" format string to `Display` the message + .debug_suggestion = add a "{"{"}:?{"}"}" format string to use the `Debug` implementation of `{$ty}` - .panic-suggestion = {$already_suggested -> + .panic_suggestion = {$already_suggested -> [true] or use *[false] use } std::panic::panic_any instead -lint-non-fmt-panic-unused = +lint_non_fmt_panic_unused = panic message contains {$count -> [one] an unused *[other] unused @@ -95,13 +95,13 @@ lint-non-fmt-panic-unused = *[other] placeholders } .note = this message is not used as a format string when given without arguments, but will be in Rust 2021 - .add-args-suggestion = add the missing {$count -> + .add_args_suggestion = add the missing {$count -> [one] argument *[other] arguments } - .add-fmt-suggestion = or add a "{"{"}{"}"}" format string to use the message literally + .add_fmt_suggestion = or add a "{"{"}{"}"}" format string to use the message literally -lint-non-fmt-panic-braces = +lint_non_fmt_panic_braces = panic message contains {$count -> [one] a brace *[other] braces @@ -109,30 +109,30 @@ lint-non-fmt-panic-braces = .note = this message is not used as a format string, but will be in Rust 2021 .suggestion = add a "{"{"}{"}"}" format string to use the message literally -lint-non-camel-case-type = {$sort} `{$name}` should have an upper camel case name +lint_non_camel_case_type = {$sort} `{$name}` should have an upper camel case name .suggestion = convert the identifier to upper camel case .label = should have an UpperCamelCase name -lint-non-snake-case = {$sort} `{$name}` should have a snake case name - .rename-or-convert-suggestion = rename the identifier or convert it to a snake case raw identifier - .cannot-convert-note = `{$sc}` cannot be used as a raw identifier - .rename-suggestion = rename the identifier - .convert-suggestion = convert the identifier to snake case +lint_non_snake_case = {$sort} `{$name}` should have a snake case name + .rename_or_convert_suggestion = rename the identifier or convert it to a snake case raw identifier + .cannot_convert_note = `{$sc}` cannot be used as a raw identifier + .rename_suggestion = rename the identifier + .convert_suggestion = convert the identifier to snake case .help = convert the identifier to snake case: `{$sc}` .label = should have a snake_case name -lint-non-upper_case-global = {$sort} `{$name}` should have an upper case name +lint_non_upper_case_global = {$sort} `{$name}` should have an upper case name .suggestion = convert the identifier to upper case .label = should have an UPPER_CASE name -lint-noop-method-call = call to `.{$method}()` on a reference in this situation does nothing +lint_noop_method_call = call to `.{$method}()` on a reference in this situation does nothing .label = unnecessary method call .note = the type `{$receiver_ty}` which `{$method}` is being called on is the same as the type returned from `{$method}`, so the method call does not do anything and can be removed -lint-pass-by-value = passing `{$ty}` by reference +lint_pass_by_value = passing `{$ty}` by reference .suggestion = try passing by value -lint-redundant-semicolons = +lint_redundant_semicolons = unnecessary trailing {$multiple -> [true] semicolons *[false] semicolon @@ -142,254 +142,294 @@ lint-redundant-semicolons = *[false] this semicolon } -lint-drop-trait-constraints = +lint_drop_trait_constraints = bounds on `{$predicate}` are most likely incorrect, consider instead using `{$needs_drop}` to detect whether a type can be trivially dropped -lint-drop-glue = +lint_drop_glue = types that do not implement `Drop` can still have drop glue, consider instead using `{$needs_drop}` to detect whether a type is trivially dropped -lint-range-endpoint-out-of-range = range endpoint is out of range for `{$ty}` +lint_range_endpoint_out_of_range = range endpoint is out of range for `{$ty}` .suggestion = use an inclusive range instead -lint-overflowing-bin-hex = literal out of range for `{$ty}` - .negative-note = the literal `{$lit}` (decimal `{$dec}`) does not fit into the type `{$ty}` - .negative-becomes-note = and the value `-{$lit}` will become `{$actually}{$ty}` - .positive-note = the literal `{$lit}` (decimal `{$dec}`) does not fit into the type `{$ty}` and will become `{$actually}{$ty}` +lint_overflowing_bin_hex = literal out of range for `{$ty}` + .negative_note = the literal `{$lit}` (decimal `{$dec}`) does not fit into the type `{$ty}` + .negative_becomes_note = and the value `-{$lit}` will become `{$actually}{$ty}` + .positive_note = the literal `{$lit}` (decimal `{$dec}`) does not fit into the type `{$ty}` and will become `{$actually}{$ty}` .suggestion = consider using the type `{$suggestion_ty}` instead .help = consider using the type `{$suggestion_ty}` instead -lint-overflowing-int = literal out of range for `{$ty}` +lint_overflowing_int = literal out of range for `{$ty}` .note = the literal `{$lit}` does not fit into the type `{$ty}` whose range is `{$min}..={$max}` .help = consider using the type `{$suggestion_ty}` instead -lint-only-cast-u8-to-char = only `u8` can be cast into `char` +lint_only_cast_u8_to_char = only `u8` can be cast into `char` .suggestion = use a `char` literal instead -lint-overflowing-uint = literal out of range for `{$ty}` +lint_overflowing_uint = literal out of range for `{$ty}` .note = the literal `{$lit}` does not fit into the type `{$ty}` whose range is `{$min}..={$max}` -lint-overflowing-literal = literal out of range for `{$ty}` +lint_overflowing_literal = literal out of range for `{$ty}` .note = the literal `{$lit}` does not fit into the type `{$ty}` and will be converted to `{$ty}::INFINITY` -lint-unused-comparisons = comparison is useless due to type limits +lint_unused_comparisons = comparison is useless due to type limits -lint-improper-ctypes = `extern` {$desc} uses type `{$ty}`, which is not FFI-safe +lint_improper_ctypes = `extern` {$desc} uses type `{$ty}`, which is not FFI-safe .label = not FFI-safe .note = the type is defined here -lint-improper-ctypes-opaque = opaque types have no C equivalent +lint_improper_ctypes_opaque = opaque types have no C equivalent -lint-improper-ctypes-fnptr-reason = this function pointer has Rust-specific calling convention -lint-improper-ctypes-fnptr-help = consider using an `extern fn(...) -> ...` function pointer instead +lint_improper_ctypes_fnptr_reason = this function pointer has Rust-specific calling convention +lint_improper_ctypes_fnptr_help = consider using an `extern fn(...) -> ...` function pointer instead -lint-improper-ctypes-tuple-reason = tuples have unspecified layout -lint-improper-ctypes-tuple-help = consider using a struct instead +lint_improper_ctypes_tuple_reason = tuples have unspecified layout +lint_improper_ctypes_tuple_help = consider using a struct instead -lint-improper-ctypes-str-reason = string slices have no C equivalent -lint-improper-ctypes-str-help = consider using `*const u8` and a length instead +lint_improper_ctypes_str_reason = string slices have no C equivalent +lint_improper_ctypes_str_help = consider using `*const u8` and a length instead -lint-improper-ctypes-dyn = trait objects have no C equivalent +lint_improper_ctypes_dyn = trait objects have no C equivalent -lint-improper-ctypes-slice-reason = slices have no C equivalent -lint-improper-ctypes-slice-help = consider using a raw pointer instead +lint_improper_ctypes_slice_reason = slices have no C equivalent +lint_improper_ctypes_slice_help = consider using a raw pointer instead -lint-improper-ctypes-128bit = 128-bit integers don't currently have a known stable ABI +lint_improper_ctypes_128bit = 128-bit integers don't currently have a known stable ABI -lint-improper-ctypes-char-reason = the `char` type has no C equivalent -lint-improper-ctypes-char-help = consider using `u32` or `libc::wchar_t` instead +lint_improper_ctypes_char_reason = the `char` type has no C equivalent +lint_improper_ctypes_char_help = consider using `u32` or `libc::wchar_t` instead -lint-improper-ctypes-non-exhaustive = this enum is non-exhaustive -lint-improper-ctypes-non-exhaustive-variant = this enum has non-exhaustive variants +lint_improper_ctypes_non_exhaustive = this enum is non-exhaustive +lint_improper_ctypes_non_exhaustive_variant = this enum has non-exhaustive variants -lint-improper-ctypes-enum-repr-reason = enum has no representation hint -lint-improper-ctypes-enum-repr-help = +lint_improper_ctypes_enum_repr_reason = enum has no representation hint +lint_improper_ctypes_enum_repr_help = consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum -lint-improper-ctypes-struct-fieldless-reason = this struct has no fields -lint-improper-ctypes-struct-fieldless-help = consider adding a member to this struct +lint_improper_ctypes_struct_fieldless_reason = this struct has no fields +lint_improper_ctypes_struct_fieldless_help = consider adding a member to this struct -lint-improper-ctypes-union-fieldless-reason = this union has no fields -lint-improper-ctypes-union-fieldless-help = consider adding a member to this union +lint_improper_ctypes_union_fieldless_reason = this union has no fields +lint_improper_ctypes_union_fieldless_help = consider adding a member to this union -lint-improper-ctypes-struct-non-exhaustive = this struct is non-exhaustive -lint-improper-ctypes-union-non-exhaustive = this union is non-exhaustive +lint_improper_ctypes_struct_non_exhaustive = this struct is non-exhaustive +lint_improper_ctypes_union_non_exhaustive = this union is non-exhaustive -lint-improper-ctypes-struct-layout-reason = this struct has unspecified layout -lint-improper-ctypes-struct-layout-help = consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct +lint_improper_ctypes_struct_layout_reason = this struct has unspecified layout +lint_improper_ctypes_struct_layout_help = consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct -lint-improper-ctypes-union-layout-reason = this union has unspecified layout -lint-improper-ctypes-union-layout-help = consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this union +lint_improper_ctypes_union_layout_reason = this union has unspecified layout +lint_improper_ctypes_union_layout_help = consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this union -lint-improper-ctypes-box = box cannot be represented as a single pointer +lint_improper_ctypes_box = box cannot be represented as a single pointer -lint-improper-ctypes-enum-phantomdata = this enum contains a PhantomData field +lint_improper_ctypes_enum_phantomdata = this enum contains a PhantomData field -lint-improper-ctypes-struct-zst = this struct contains only zero-sized fields +lint_improper_ctypes_struct_zst = this struct contains only zero-sized fields -lint-improper-ctypes-array-reason = passing raw arrays by value is not FFI-safe -lint-improper-ctypes-array-help = consider passing a pointer to the array +lint_improper_ctypes_array_reason = passing raw arrays by value is not FFI-safe +lint_improper_ctypes_array_help = consider passing a pointer to the array -lint-improper-ctypes-only-phantomdata = composed only of `PhantomData` +lint_improper_ctypes_only_phantomdata = composed only of `PhantomData` -lint-variant-size-differences = +lint_variant_size_differences = enum variant is more than three times larger ({$largest} bytes) than the next largest -lint-atomic-ordering-load = atomic loads cannot have `Release` or `AcqRel` ordering +lint_atomic_ordering_load = atomic loads cannot have `Release` or `AcqRel` ordering .help = consider using ordering modes `Acquire`, `SeqCst` or `Relaxed` -lint-atomic-ordering-store = atomic stores cannot have `Acquire` or `AcqRel` ordering +lint_atomic_ordering_store = atomic stores cannot have `Acquire` or `AcqRel` ordering .help = consider using ordering modes `Release`, `SeqCst` or `Relaxed` -lint-atomic-ordering-fence = memory fences cannot have `Relaxed` ordering +lint_atomic_ordering_fence = memory fences cannot have `Relaxed` ordering .help = consider using ordering modes `Acquire`, `Release`, `AcqRel` or `SeqCst` -lint-atomic-ordering-invalid = `{$method}`'s failure ordering may not be `Release` or `AcqRel`, since a failed `{$method}` does not result in a write +lint_atomic_ordering_invalid = `{$method}`'s failure ordering may not be `Release` or `AcqRel`, since a failed `{$method}` does not result in a write .label = invalid failure ordering .help = consider using `Acquire` or `Relaxed` failure ordering instead -lint-unused-op = unused {$op} that must be used +lint_unused_op = unused {$op} that must be used .label = the {$op} produces a value .suggestion = use `let _ = ...` to ignore the resulting value -lint-unused-result = unused result of type `{$ty}` +lint_unused_result = unused result of type `{$ty}` -lint-unused-closure = +lint_unused_closure = unused {$pre}{$count -> [one] closure *[other] closures }{$post} that must be used .note = closures are lazy and do nothing unless called -lint-unused-generator = +lint_unused_generator = unused {$pre}{$count -> [one] generator *[other] generator }{$post} that must be used .note = generators are lazy and do nothing unless resumed -lint-unused-def = unused {$pre}`{$def}`{$post} that must be used +lint_unused_def = unused {$pre}`{$def}`{$post} that must be used -lint-path-statement-drop = path statement drops value +lint_path_statement_drop = path statement drops value .suggestion = use `drop` to clarify the intent -lint-path-statement-no-effect = path statement with no effect +lint_path_statement_no_effect = path statement with no effect -lint-unused-delim = unnecessary {$delim} around {$item} +lint_unused_delim = unnecessary {$delim} around {$item} .suggestion = remove these {$delim} -lint-unused-import-braces = braces around {$node} is unnecessary +lint_unused_import_braces = braces around {$node} is unnecessary -lint-unused-allocation = unnecessary allocation, use `&` instead -lint-unused-allocation-mut = unnecessary allocation, use `&mut` instead +lint_unused_allocation = unnecessary allocation, use `&` instead +lint_unused_allocation_mut = unnecessary allocation, use `&mut` instead -lint-builtin-while-true = denote infinite loops with `loop {"{"} ... {"}"}` +lint_builtin_while_true = denote infinite loops with `loop {"{"} ... {"}"}` .suggestion = use `loop` -lint-builtin-box-pointers = type uses owned (Box type) pointers: {$ty} +lint_builtin_box_pointers = type uses owned (Box type) pointers: {$ty} -lint-builtin-non-shorthand-field-patterns = the `{$ident}:` in this pattern is redundant +lint_builtin_non_shorthand_field_patterns = the `{$ident}:` in this pattern is redundant .suggestion = use shorthand field pattern -lint-builtin-overridden-symbol-name = +lint_builtin_overridden_symbol_name = the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them -lint-builtin-overridden-symbol-section = +lint_builtin_overridden_symbol_section = the program's behavior with overridden link sections on items is unpredictable and Rust cannot provide guarantees when you manually override them -lint-builtin-allow-internal-unsafe = +lint_builtin_allow_internal_unsafe = `allow_internal_unsafe` allows defining macros using unsafe without triggering the `unsafe_code` lint at their call site -lint-builtin-unsafe-block = usage of an `unsafe` block +lint_builtin_unsafe_block = usage of an `unsafe` block -lint-builtin-unsafe-trait = declaration of an `unsafe` trait +lint_builtin_unsafe_trait = declaration of an `unsafe` trait -lint-builtin-unsafe-impl = implementation of an `unsafe` trait +lint_builtin_unsafe_impl = implementation of an `unsafe` trait -lint-builtin-no-mangle-fn = declaration of a `no_mangle` function -lint-builtin-export-name-fn = declaration of a function with `export_name` -lint-builtin-link-section-fn = declaration of a function with `link_section` +lint_builtin_no_mangle_fn = declaration of a `no_mangle` function +lint_builtin_export_name_fn = declaration of a function with `export_name` +lint_builtin_link_section_fn = declaration of a function with `link_section` -lint-builtin-no-mangle-static = declaration of a `no_mangle` static -lint-builtin-export-name-static = declaration of a static with `export_name` -lint-builtin-link-section-static = declaration of a static with `link_section` +lint_builtin_no_mangle_static = declaration of a `no_mangle` static +lint_builtin_export_name_static = declaration of a static with `export_name` +lint_builtin_link_section_static = declaration of a static with `link_section` -lint-builtin-no-mangle-method = declaration of a `no_mangle` method -lint-builtin-export-name-method = declaration of a method with `export_name` +lint_builtin_no_mangle_method = declaration of a `no_mangle` method +lint_builtin_export_name_method = declaration of a method with `export_name` -lint-builtin-decl-unsafe-fn = declaration of an `unsafe` function -lint-builtin-decl-unsafe-method = declaration of an `unsafe` method -lint-builtin-impl-unsafe-method = implementation of an `unsafe` method +lint_builtin_decl_unsafe_fn = declaration of an `unsafe` function +lint_builtin_decl_unsafe_method = declaration of an `unsafe` method +lint_builtin_impl_unsafe_method = implementation of an `unsafe` method -lint-builtin-missing-doc = missing documentation for {$article} {$desc} +lint_builtin_missing_doc = missing documentation for {$article} {$desc} -lint-builtin-missing-copy-impl = type could implement `Copy`; consider adding `impl Copy` +lint_builtin_missing_copy_impl = type could implement `Copy`; consider adding `impl Copy` -lint-builtin-missing-debug-impl = +lint_builtin_missing_debug_impl = type does not implement `{$debug}`; consider adding `#[derive(Debug)]` or a manual implementation -lint-builtin-anonymous-params = anonymous parameters are deprecated and will be removed in the next edition +lint_builtin_anonymous_params = anonymous parameters are deprecated and will be removed in the next edition .suggestion = try naming the parameter or explicitly ignoring it -lint-builtin-deprecated-attr-link = use of deprecated attribute `{$name}`: {$reason}. See {$link} -lint-builtin-deprecated-attr-used = use of deprecated attribute `{$name}`: no longer used. -lint-builtin-deprecated-attr-default-suggestion = remove this attribute +lint_builtin_deprecated_attr_link = use of deprecated attribute `{$name}`: {$reason}. See {$link} +lint_builtin_deprecated_attr_used = use of deprecated attribute `{$name}`: no longer used. +lint_builtin_deprecated_attr_default_suggestion = remove this attribute -lint-builtin-unused-doc-comment = unused doc comment +lint_builtin_unused_doc_comment = unused doc comment .label = rustdoc does not generate documentation for {$kind} - .plain-help = use `//` for a plain comment - .block-help = use `/* */` for a plain comment + .plain_help = use `//` for a plain comment + .block_help = use `/* */` for a plain comment -lint-builtin-no-mangle-generic = functions generic over types or consts must be mangled +lint_builtin_no_mangle_generic = functions generic over types or consts must be mangled .suggestion = remove this attribute -lint-builtin-const-no-mangle = const items should never be `#[no_mangle]` +lint_builtin_const_no_mangle = const items should never be `#[no_mangle]` .suggestion = try a static value -lint-builtin-mutable-transmutes = +lint_builtin_mutable_transmutes = transmuting &T to &mut T is undefined behavior, even if the reference is unused, consider instead using an UnsafeCell -lint-builtin-unstable-features = unstable feature +lint_builtin_unstable_features = unstable feature -lint-builtin-unreachable-pub = unreachable `pub` {$what} +lint_builtin_unreachable_pub = unreachable `pub` {$what} .suggestion = consider restricting its visibility .help = or consider exporting it for use by other crates -lint-builtin-type-alias-bounds-help = use fully disambiguated paths (i.e., `<T as Trait>::Assoc`) to refer to associated types in type aliases +lint_builtin_unexpected_cli_config_name = unexpected `{$name}` as condition name + .help = was set with `--cfg` but isn't in the `--check-cfg` expected names -lint-builtin-type-alias-where-clause = where clauses are not enforced in type aliases +lint_builtin_unexpected_cli_config_value = unexpected condition value `{$value}` for condition name `{$name}` + .help = was set with `--cfg` but isn't in the `--check-cfg` expected values + +lint_builtin_type_alias_bounds_help = use fully disambiguated paths (i.e., `<T as Trait>::Assoc`) to refer to associated types in type aliases + +lint_builtin_type_alias_where_clause = where clauses are not enforced in type aliases .suggestion = the clause will not be checked when the type alias is used, and should be removed -lint-builtin-type-alias-generic-bounds = bounds on generic parameters are not enforced in type aliases +lint_builtin_type_alias_generic_bounds = bounds on generic parameters are not enforced in type aliases .suggestion = the bound will not be checked when the type alias is used, and should be removed -lint-builtin-trivial-bounds = {$predicate_kind_name} bound {$predicate} does not depend on any type or lifetime parameters +lint_builtin_trivial_bounds = {$predicate_kind_name} bound {$predicate} does not depend on any type or lifetime parameters -lint-builtin-ellipsis-inclusive-range-patterns = `...` range patterns are deprecated +lint_builtin_ellipsis_inclusive_range_patterns = `...` range patterns are deprecated .suggestion = use `..=` for an inclusive range -lint-builtin-unnameable-test-items = cannot test inner items +lint_builtin_unnameable_test_items = cannot test inner items -lint-builtin-keyword-idents = `{$kw}` is a keyword in the {$next} edition +lint_builtin_keyword_idents = `{$kw}` is a keyword in the {$next} edition .suggestion = you can use a raw identifier to stay compatible -lint-builtin-explicit-outlives = outlives requirements can be inferred +lint_builtin_explicit_outlives = outlives requirements can be inferred .suggestion = remove {$count -> [one] this bound *[other] these bounds } -lint-builtin-incomplete-features = the feature `{$name}` is incomplete and may not be safe to use and/or cause compiler crashes +lint_builtin_incomplete_features = the feature `{$name}` is incomplete and may not be safe to use and/or cause compiler crashes .note = see issue #{$n} <https://github.com/rust-lang/rust/issues/{$n}> for more information .help = consider using `min_{$name}` instead, which is more stable and complete -lint-builtin-clashing-extern-same-name = `{$this_fi}` redeclared with a different signature - .previous-decl-label = `{$orig}` previously declared here - .mismatch-label = this signature doesn't match the previous declaration -lint-builtin-clashing-extern-diff-name = `{$this_fi}` redeclares `{$orig}` with a different signature - .previous-decl-label = `{$orig}` previously declared here - .mismatch-label = this signature doesn't match the previous declaration +lint_builtin_clashing_extern_same_name = `{$this_fi}` redeclared with a different signature + .previous_decl_label = `{$orig}` previously declared here + .mismatch_label = this signature doesn't match the previous declaration +lint_builtin_clashing_extern_diff_name = `{$this_fi}` redeclares `{$orig}` with a different signature + .previous_decl_label = `{$orig}` previously declared here + .mismatch_label = this signature doesn't match the previous declaration -lint-builtin-deref-nullptr = dereferencing a null pointer +lint_builtin_deref_nullptr = dereferencing a null pointer .label = this code causes undefined behavior when executed -lint-builtin-asm-labels = avoid using named labels in inline assembly +lint_builtin_asm_labels = avoid using named labels in inline assembly + +lint_overruled_attribute = {$lint_level}({$lint_source}) incompatible with previous forbid + .label = overruled by previous forbid + +lint_default_source = `forbid` lint level is the default for {$id} + +lint_node_source = `forbid` level set here + .note = {$reason} + +lint_command_line_source = `forbid` lint level was set on command line + +lint_malformed_attribute = malformed lint attribute input + +lint_bad_attribute_argument = bad attribute argument + +lint_reason_must_be_string_literal = reason must be a string literal + +lint_reason_must_come_last = reason in lint attribute must come last + +lint_unknown_tool_in_scoped_lint = unknown tool name `{$tool_name}` found in scoped lint: `{$tool_name}::{$lint_name}` + .help = add `#![register_tool({$tool_name})]` to the crate root + +lint_unsupported_group = `{$lint_group}` lint group is not supported with ´--force-warn´ + +lint_requested_level = requested on the command line with `{$level} {$lint_name}` + +lint_check_name_unknown = unknown lint: `{$lint_name}` + .help = did you mean: `{$suggestion}` + +lint_check_name_unknown_tool = unknown lint tool: `{$tool_name}` + +lint_check_name_warning = {$msg} + +lint_check_name_deprecated = lint name `{$lint_name}` is deprecated and does not have an effect anymore. Use: {$new_name} diff --git a/compiler/rustc_error_messages/locales/en-US/metadata.ftl b/compiler/rustc_error_messages/locales/en-US/metadata.ftl new file mode 100644 index 000000000..d27100c56 --- /dev/null +++ b/compiler/rustc_error_messages/locales/en-US/metadata.ftl @@ -0,0 +1,275 @@ +metadata_rlib_required = + crate `{$crate_name}` required to be available in rlib format, but was not found in this form + +metadata_lib_required = + crate `{$crate_name}` required to be available in {$kind} format, but was not found in this form + +metadata_crate_dep_multiple = + cannot satisfy dependencies so `{$crate_name}` only shows up once + .help = having upstream crates all available in one format will likely make this go away + +metadata_two_panic_runtimes = + cannot link together two panic runtimes: {$prev_name} and {$cur_name} + +metadata_bad_panic_strategy = + the linked panic runtime `{$runtime}` is not compiled with this crate's panic strategy `{$strategy}` + +metadata_required_panic_strategy = + the crate `{$crate_name}` requires panic strategy `{$found_strategy}` which is incompatible with this crate's strategy of `{$desired_strategy}` + +metadata_incompatible_panic_in_drop_strategy = + the crate `{$crate_name}` is compiled with the panic-in-drop strategy `{$found_strategy}` which is incompatible with this crate's strategy of `{$desired_strategy}` + +metadata_multiple_names_in_link = + multiple `name` arguments in a single `#[link]` attribute + +metadata_multiple_kinds_in_link = + multiple `kind` arguments in a single `#[link]` attribute + +metadata_link_name_form = + link name must be of the form `name = "string"` + +metadata_link_kind_form = + link kind must be of the form `kind = "string"` + +metadata_link_modifiers_form = + link modifiers must be of the form `modifiers = "string"` + +metadata_link_cfg_form = + link cfg must be of the form `cfg(/* predicate */)` + +metadata_wasm_import_form = + wasm import module must be of the form `wasm_import_module = "string"` + +metadata_empty_link_name = + link name must not be empty + .label = empty link name + +metadata_link_framework_apple = + link kind `framework` is only supported on Apple targets + +metadata_framework_only_windows = + link kind `raw-dylib` is only supported on Windows targets + +metadata_unknown_link_kind = + unknown link kind `{$kind}`, expected one of: static, dylib, framework, raw-dylib + .label = unknown link kind + +metadata_multiple_link_modifiers = + multiple `modifiers` arguments in a single `#[link]` attribute + +metadata_multiple_cfgs = + multiple `cfg` arguments in a single `#[link]` attribute + +metadata_link_cfg_single_predicate = + link cfg must have a single predicate argument + +metadata_multiple_wasm_import = + multiple `wasm_import_module` arguments in a single `#[link]` attribute + +metadata_unexpected_link_arg = + unexpected `#[link]` argument, expected one of: name, kind, modifiers, cfg, wasm_import_module, import_name_type + +metadata_invalid_link_modifier = + invalid linking modifier syntax, expected '+' or '-' prefix before one of: bundle, verbatim, whole-archive, as-needed + +metadata_multiple_modifiers = + multiple `{$modifier}` modifiers in a single `modifiers` argument + +metadata_bundle_needs_static = + linking modifier `bundle` is only compatible with `static` linking kind + +metadata_whole_archive_needs_static = + linking modifier `whole-archive` is only compatible with `static` linking kind + +metadata_as_needed_compatibility = + linking modifier `as-needed` is only compatible with `dylib` and `framework` linking kinds + +metadata_unknown_link_modifier = + unknown linking modifier `{$modifier}`, expected one of: bundle, verbatim, whole-archive, as-needed + +metadata_incompatible_wasm_link = + `wasm_import_module` is incompatible with other arguments in `#[link]` attributes + +metadata_link_requires_name = + `#[link]` attribute requires a `name = "string"` argument + .label = missing `name` argument + +metadata_raw_dylib_no_nul = + link name must not contain NUL characters if link kind is `raw-dylib` + +metadata_link_ordinal_raw_dylib = + `#[link_ordinal]` is only supported if link kind is `raw-dylib` + +metadata_lib_framework_apple = + library kind `framework` is only supported on Apple targets + +metadata_empty_renaming_target = + an empty renaming target was specified for library `{$lib_name}` + +metadata_renaming_no_link = + renaming of the library `{$lib_name}` was specified, however this crate contains no `#[link(...)]` attributes referencing this library + +metadata_multiple_renamings = + multiple renamings were specified for library `{$lib_name}` + +metadata_no_link_mod_override = + overriding linking modifiers from command line is not supported + +metadata_unsupported_abi_i686 = + ABI not supported by `#[link(kind = "raw-dylib")]` on i686 + +metadata_unsupported_abi = + ABI not supported by `#[link(kind = "raw-dylib")]` on this architecture + +metadata_fail_create_file_encoder = + failed to create file encoder: {$err} + +metadata_fail_seek_file = + failed to seek the file: {$err} + +metadata_fail_write_file = + failed to write to the file: {$err} + +metadata_crate_not_panic_runtime = + the crate `{$crate_name}` is not a panic runtime + +metadata_no_panic_strategy = + the crate `{$crate_name}` does not have the panic strategy `{$strategy}` + +metadata_profiler_builtins_needs_core = + `profiler_builtins` crate (required by compiler options) is not compatible with crate attribute `#![no_core]` + +metadata_not_profiler_runtime = + the crate `{$crate_name}` is not a profiler runtime + +metadata_no_multiple_global_alloc = + cannot define multiple global allocators + .label = cannot define a new global allocator + +metadata_prev_global_alloc = + previous global allocator defined here + +metadata_conflicting_global_alloc = + the `#[global_allocator]` in {$other_crate_name} conflicts with global allocator in: {$crate_name} + +metadata_global_alloc_required = + no global memory allocator found but one is required; link to std or add `#[global_allocator]` to a static item that implements the GlobalAlloc trait + +metadata_no_transitive_needs_dep = + the crate `{$crate_name}` cannot depend on a crate that needs {$needs_crate_name}, but it depends on `{$deps_crate_name}` + +metadata_failed_write_error = + failed to write {$filename}: {$err} + +metadata_missing_native_library = + could not find native static library `{$libname}`, perhaps an -L flag is missing? + +metadata_failed_create_tempdir = + couldn't create a temp dir: {$err} + +metadata_failed_create_file = + failed to create the file {$filename}: {$err} + +metadata_failed_create_encoded_metadata = + failed to create encoded metadata from file: {$err} + +metadata_non_ascii_name = + cannot load a crate with a non-ascii name `{$crate_name}` + +metadata_extern_location_not_exist = + extern location for {$crate_name} does not exist: {$location} + +metadata_extern_location_not_file = + extern location for {$crate_name} is not a file: {$location} + +metadata_multiple_candidates = + multiple {$flavor} candidates for `{$crate_name}` found + +metadata_multiple_matching_crates = + multiple matching crates for `{$crate_name}` + .note = candidates:{$candidates} + +metadata_symbol_conflicts_current = + the current crate is indistinguishable from one of its dependencies: it has the same crate-name `{$crate_name}` and was compiled with the same `-C metadata` arguments. This will result in symbol conflicts between the two. + +metadata_symbol_conflicts_others = + found two different crates with name `{$crate_name}` that are not distinguished by differing `-C metadata`. This will result in symbol conflicts between the two. + +metadata_stable_crate_id_collision = + found crates (`{$crate_name0}` and `{$crate_name1}`) with colliding StableCrateId values. + +metadata_dl_error = + {$err} + +metadata_newer_crate_version = + found possibly newer version of crate `{$crate_name}`{$add_info} + .note = perhaps that crate needs to be recompiled? + +metadata_found_crate_versions = + the following crate versions were found:{$found_crates} + +metadata_no_crate_with_triple = + couldn't find crate `{$crate_name}` with expected target triple {$locator_triple}{$add_info} + +metadata_found_staticlib = + found staticlib `{$crate_name}` instead of rlib or dylib{$add_info} + .help = please recompile that crate using --crate-type lib + +metadata_incompatible_rustc = + found crate `{$crate_name}` compiled by an incompatible version of rustc{$add_info} + .help = please recompile that crate using this compiler ({$rustc_version}) (consider running `cargo clean` first) + +metadata_invalid_meta_files = + found invalid metadata files for crate `{$crate_name}`{$add_info} + +metadata_cannot_find_crate = + can't find crate for `{$crate_name}`{$add_info} + +metadata_no_dylib_plugin = + plugin `{$crate_name}` only found in rlib format, but must be available in dylib format + +metadata_target_not_installed = + the `{$locator_triple}` target may not be installed + +metadata_target_no_std_support = + the `{$locator_triple}` target may not support the standard library + +metadata_consider_downloading_target = + consider downloading the target with `rustup target add {$locator_triple}` + +metadata_std_required = + `std` is required by `{$current_crate}` because it does not declare `#![no_std]` + +metadata_consider_building_std = + consider building the standard library from source with `cargo build -Zbuild-std` + +metadata_compiler_missing_profiler = + the compiler may have been built without the profiler runtime + +metadata_install_missing_components = + maybe you need to install the missing components with: `rustup component add rust-src rustc-dev llvm-tools-preview` + +metadata_cant_find_crate = + can't find crate + +metadata_crate_location_unknown_type = + extern location for {$crate_name} is of an unknown type: {$path} + +metadata_lib_filename_form = + file name should be lib*.rlib or {dll_prefix}*.{dll_suffix} + +metadata_multiple_import_name_type = + multiple `import_name_type` arguments in a single `#[link]` attribute + +metadata_import_name_type_form = + import name type must be of the form `import_name_type = "string"` + +metadata_import_name_type_x86 = + import name type is only supported on x86 + +metadata_unknown_import_name_type = + unknown import name type `{$import_name_type}`, expected one of: decorated, noprefix, undecorated + +metadata_import_name_type_raw = + import name type can only be used with link kind `raw-dylib` diff --git a/compiler/rustc_error_messages/locales/en-US/middle.ftl b/compiler/rustc_error_messages/locales/en-US/middle.ftl new file mode 100644 index 000000000..ed8348864 --- /dev/null +++ b/compiler/rustc_error_messages/locales/en-US/middle.ftl @@ -0,0 +1,17 @@ +middle_drop_check_overflow = + overflow while adding drop-check rules for {$ty} + .note = overflowed on {$overflow_ty} + +middle_opaque_hidden_type_mismatch = + concrete type differs from previous defining opaque type use + .label = expected `{$self_ty}`, got `{$other_ty}` + +middle_conflict_types = + this expression supplies two conflicting concrete types for the same opaque type + +middle_previous_use_here = + previous use here + +middle_limit_invalid = + `limit` must be a non-negative integer + .label = {$error_str} diff --git a/compiler/rustc_error_messages/locales/en-US/mir_dataflow.ftl b/compiler/rustc_error_messages/locales/en-US/mir_dataflow.ftl new file mode 100644 index 000000000..988541525 --- /dev/null +++ b/compiler/rustc_error_messages/locales/en-US/mir_dataflow.ftl @@ -0,0 +1,29 @@ +mir_dataflow_path_must_end_in_filename = + path must end in a filename + +mir_dataflow_unknown_formatter = + unknown formatter + +mir_dataflow_duplicate_values_for = + duplicate values for `{$name}` + +mir_dataflow_requires_an_argument = + `{$name}` requires an argument + +mir_dataflow_stop_after_dataflow_ended_compilation = + stop_after_dataflow ended compilation + +mir_dataflow_peek_must_be_place_or_ref_place = + rustc_peek: argument expression must be either `place` or `&place` + +mir_dataflow_peek_must_be_not_temporary = + dataflow::sanity_check cannot feed a non-temp to rustc_peek + +mir_dataflow_peek_bit_not_set = + rustc_peek: bit not set + +mir_dataflow_peek_argument_not_a_local = + rustc_peek: argument was not a local + +mir_dataflow_peek_argument_untracked = + rustc_peek: argument untracked diff --git a/compiler/rustc_error_messages/locales/en-US/monomorphize.ftl b/compiler/rustc_error_messages/locales/en-US/monomorphize.ftl new file mode 100644 index 000000000..42c84fdd2 --- /dev/null +++ b/compiler/rustc_error_messages/locales/en-US/monomorphize.ftl @@ -0,0 +1,26 @@ +monomorphize_recursion_limit = + reached the recursion limit while instantiating `{$shrunk}` + .note = `{$def_path_str}` defined here + +monomorphize_written_to_path = the full type name has been written to '{$path}' + +monomorphize_type_length_limit = reached the type-length limit while instantiating `{$shrunk}` + +monomorphize_consider_type_length_limit = + consider adding a `#![type_length_limit="{$type_length}"]` attribute to your crate + +monomorphize_fatal_error = {$error_message} + +monomorphize_unknown_partition_strategy = unknown partitioning strategy + +monomorphize_symbol_already_defined = symbol `{$symbol}` is already defined + +monomorphize_unused_generic_params = item has unused generic parameters + +monomorphize_large_assignments = + moving {$size} bytes + .label = value moved from here + .note = The current maximum size is {$limit}, but it can be customized with the move_size_limit attribute: `#![move_size_limit = "..."]` + +monomorphize_requires_lang_item = + requires `{$lang_item}` lang_item diff --git a/compiler/rustc_error_messages/locales/en-US/parser.ftl b/compiler/rustc_error_messages/locales/en-US/parser.ftl index 076b1b1ca..f74df3d97 100644 --- a/compiler/rustc_error_messages/locales/en-US/parser.ftl +++ b/compiler/rustc_error_messages/locales/en-US/parser.ftl @@ -1,34 +1,158 @@ -parser-struct-literal-body-without-path = +parser_struct_literal_body_without_path = struct literal body without path .suggestion = you might have forgotten to add the struct literal inside the block -parser-maybe-report-ambiguous-plus = +parser_maybe_report_ambiguous_plus = ambiguous `+` in a type .suggestion = use parentheses to disambiguate -parser-maybe-recover-from-bad-type-plus = +parser_maybe_recover_from_bad_type_plus = expected a path on the left-hand side of `+`, not `{$ty}` -parser-add-paren = try adding parentheses +parser_add_paren = try adding parentheses -parser-forgot-paren = perhaps you forgot parentheses? +parser_forgot_paren = perhaps you forgot parentheses? -parser-expect-path = expected a path +parser_expect_path = expected a path -parser-maybe-recover-from-bad-qpath-stage-2 = +parser_maybe_recover_from_bad_qpath_stage_2 = missing angle brackets in associated item path .suggestion = try: `{$ty}` -parser-incorrect-semicolon = +parser_incorrect_semicolon = expected item, found `;` .suggestion = remove this semicolon .help = {$name} declarations are not followed by a semicolon -parser-incorrect-use-of-await = +parser_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 + .parentheses_suggestion = `await` is not a method call, remove the parentheses + .postfix_suggestion = `await` is a postfix operation -parser-in-in-typo = +parser_in_in_typo = expected iterable, found keyword `in` .suggestion = remove the duplicated `in` + +parser_invalid_variable_declaration = + invalid variable declaration + +parser_switch_mut_let_order = + switch the order of `mut` and `let` +parser_missing_let_before_mut = missing keyword +parser_use_let_not_auto = write `let` instead of `auto` to introduce a new variable +parser_use_let_not_var = write `let` instead of `var` to introduce a new variable + +parser_invalid_comparison_operator = invalid comparison operator `{$invalid}` + .use_instead = `{$invalid}` is not a valid comparison operator, use `{$correct}` + .spaceship_operator_invalid = `<=>` is not a valid comparison operator, use `std::cmp::Ordering` + +parser_invalid_logical_operator = `{$incorrect}` is not a logical operator + .note = unlike in e.g., python and PHP, `&&` and `||` are used for logical operators + .use_amp_amp_for_conjunction = use `&&` to perform logical conjunction + .use_pipe_pipe_for_disjunction = use `||` to perform logical disjunction + +parser_tilde_is_not_unary_operator = `~` cannot be used as a unary operator + .suggestion = use `!` to perform bitwise not + +parser_unexpected_token_after_not = unexpected {$negated_desc} after identifier + .suggestion = use `!` to perform logical negation + +parser_malformed_loop_label = malformed loop label + .suggestion = use the correct loop label format + +parser_lifetime_in_borrow_expression = borrow expressions cannot be annotated with lifetimes + .suggestion = remove the lifetime annotation + .label = annotated with lifetime here + +parser_field_expression_with_generic = field expressions cannot have generic arguments + +parser_macro_invocation_with_qualified_path = macros cannot use qualified paths + +parser_unexpected_token_after_label = expected `while`, `for`, `loop` or `{"{"}` after a label + +parser_require_colon_after_labeled_expression = labeled expression must be followed by `:` + .note = labels are used before loops and blocks, allowing e.g., `break 'label` to them + .label = the label + .suggestion = add `:` after the label + +parser_do_catch_syntax_removed = found removed `do catch` syntax + .note = following RFC #2388, the new non-placeholder syntax is `try` + .suggestion = replace with the new syntax + +parser_float_literal_requires_integer_part = float literals must have an integer part + .suggestion = must have an integer part + +parser_invalid_int_literal_width = invalid width `{$width}` for integer literal + .help = valid widths are 8, 16, 32, 64 and 128 + +parser_invalid_num_literal_base_prefix = invalid base prefix for number literal + .note = base prefixes (`0xff`, `0b1010`, `0o755`) are lowercase + .suggestion = try making the prefix lowercase + +parser_invalid_num_literal_suffix = invalid suffix `{$suffix}` for number literal + .label = invalid suffix `{$suffix}` + .help = the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.) + +parser_invalid_float_literal_width = invalid width `{$width}` for float literal + .help = valid widths are 32 and 64 + +parser_invalid_float_literal_suffix = invalid suffix `{$suffix}` for float literal + .label = invalid suffix `{$suffix}` + .help = valid suffixes are `f32` and `f64` + +parser_int_literal_too_large = integer literal is too large + +parser_missing_semicolon_before_array = expected `;`, found `[` + .suggestion = consider adding `;` here + +parser_invalid_block_macro_segment = cannot use a `block` macro fragment here + .label = the `block` fragment is within this context + +parser_if_expression_missing_then_block = this `if` expression is missing a block after the condition + .add_then_block = add a block here + .condition_possibly_unfinished = this binary operation is possibly unfinished + +parser_if_expression_missing_condition = missing condition for `if` expression + .condition_label = expected condition here + .block_label = if this block is the condition of the `if` expression, then it must be followed by another block + +parser_expected_expression_found_let = expected expression, found `let` statement + +parser_expected_else_block = expected `{"{"}`, found {$first_tok} + .label = expected an `if` or a block after this `else` + .suggestion = add an `if` if this is the condition of a chained `else if` statement + +parser_outer_attribute_not_allowed_on_if_else = outer attributes are not allowed on `if` and `else` branches + .branch_label = the attributes are attached to this branch + .ctx_label = the branch belongs to this `{$ctx}` + .suggestion = remove the attributes + +parser_missing_in_in_for_loop = missing `in` in `for` loop + .use_in_not_of = try using `in` here instead + .add_in = try adding `in` here + +parser_missing_comma_after_match_arm = expected `,` following `match` arm + .suggestion = missing a comma here to end this `match` arm + +parser_catch_after_try = keyword `catch` cannot follow a `try` block + .help = try using `match` on the result of the `try` block instead + +parser_comma_after_base_struct = cannot use a comma after the base struct + .note = the base struct must always be the last field + .suggestion = remove this comma + +parser_eq_field_init = expected `:`, found `=` + .suggestion = replace equals symbol with a colon + +parser_dotdotdot = unexpected token: `...` + .suggest_exclusive_range = use `..` for an exclusive range + .suggest_inclusive_range = or `..=` for an inclusive range + +parser_left_arrow_operator = unexpected token: `<-` + .suggestion = if you meant to write a comparison against a negative value, add a space in between `<` and `-` + +parser_remove_let = expected pattern, found `let` + .suggestion = remove the unnecessary `let` keyword + +parser_use_eq_instead = unexpected `==` + .suggestion = try using `=` instead diff --git a/compiler/rustc_error_messages/locales/en-US/passes.ftl b/compiler/rustc_error_messages/locales/en-US/passes.ftl index b17eb9c2d..556a6452f 100644 --- a/compiler/rustc_error_messages/locales/en-US/passes.ftl +++ b/compiler/rustc_error_messages/locales/en-US/passes.ftl @@ -1,178 +1,178 @@ --passes-previously-accepted = +-passes_previously_accepted = this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! --passes-see-issue = +-passes_see_issue = see issue #{$issue} <https://github.com/rust-lang/rust/issues/{$issue}> for more information -passes-outer-crate-level-attr = +passes_outer_crate_level_attr = crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` -passes-inner-crate-level-attr = +passes_inner_crate_level_attr = crate-level attribute should be in the root module -passes-ignored-attr-with-macro = `#[{$sym}]` is ignored on struct fields, match arms and macro defs - .warn = {-passes-previously-accepted} - .note = {-passes-see-issue(issue: "80564")} +passes_ignored_attr_with_macro = `#[{$sym}]` is ignored on struct fields, match arms and macro defs + .warn = {-passes_previously_accepted} + .note = {-passes_see_issue(issue: "80564")} -passes-ignored-attr = `#[{$sym}]` is ignored on struct fields and match arms - .warn = {-passes-previously-accepted} - .note = {-passes-see-issue(issue: "80564")} +passes_ignored_attr = `#[{$sym}]` is ignored on struct fields and match arms + .warn = {-passes_previously_accepted} + .note = {-passes_see_issue(issue: "80564")} -passes-inline-ignored-function-prototype = `#[inline]` is ignored on function prototypes +passes_inline_ignored_function_prototype = `#[inline]` is ignored on function prototypes -passes-inline-ignored-constants = `#[inline]` is ignored on constants - .warn = {-passes-previously-accepted} - .note = {-passes-see-issue(issue: "65833")} +passes_inline_ignored_constants = `#[inline]` is ignored on constants + .warn = {-passes_previously_accepted} + .note = {-passes_see_issue(issue: "65833")} -passes-inline-not-fn-or-closure = attribute should be applied to function or closure +passes_inline_not_fn_or_closure = attribute should be applied to function or closure .label = not a function or closure -passes-no-coverage-ignored-function-prototype = `#[no_coverage]` is ignored on function prototypes +passes_no_coverage_ignored_function_prototype = `#[no_coverage]` is ignored on function prototypes -passes-no-coverage-propagate = +passes_no_coverage_propagate = `#[no_coverage]` does not propagate into items and must be applied to the contained functions directly -passes-no-coverage-fn-defn = `#[no_coverage]` may only be applied to function definitions +passes_no_coverage_fn_defn = `#[no_coverage]` may only be applied to function definitions -passes-no-coverage-not-coverable = `#[no_coverage]` must be applied to coverable code +passes_no_coverage_not_coverable = `#[no_coverage]` must be applied to coverable code .label = not coverable code -passes-should-be-applied-to-fn = attribute should be applied to a function definition +passes_should_be_applied_to_fn = attribute should be applied to a function definition .label = not a function definition -passes-naked-tracked-caller = cannot use `#[track_caller]` with `#[naked]` +passes_naked_tracked_caller = cannot use `#[track_caller]` with `#[naked]` -passes-should-be-applied-to-struct-enum = attribute should be applied to a struct or enum +passes_should_be_applied_to_struct_enum = attribute should be applied to a struct or enum .label = not a struct or enum -passes-should-be-applied-to-trait = attribute should be applied to a trait +passes_should_be_applied_to_trait = attribute should be applied to a trait .label = not a trait -passes-target-feature-on-statement = {passes-should-be-applied-to-fn} - .warn = {-passes-previously-accepted} - .label = {passes-should-be-applied-to-fn.label} +passes_target_feature_on_statement = {passes_should_be_applied_to_fn} + .warn = {-passes_previously_accepted} + .label = {passes_should_be_applied_to_fn.label} -passes-should-be-applied-to-static = attribute should be applied to a static +passes_should_be_applied_to_static = attribute should be applied to a static .label = not a static -passes-doc-expect-str = doc {$attr_name} attribute expects a string: #[doc({$attr_name} = "a")] +passes_doc_expect_str = doc {$attr_name} attribute expects a string: #[doc({$attr_name} = "a")] -passes-doc-alias-empty = {$attr_str} attribute cannot have empty value +passes_doc_alias_empty = {$attr_str} attribute cannot have empty value -passes-doc-alias-bad-char = {$char_} character isn't allowed in {$attr_str} +passes_doc_alias_bad_char = {$char_} character isn't allowed in {$attr_str} -passes-doc-alias-start-end = {$attr_str} cannot start or end with ' ' +passes_doc_alias_start_end = {$attr_str} cannot start or end with ' ' -passes-doc-alias-bad-location = {$attr_str} isn't allowed on {$location} +passes_doc_alias_bad_location = {$attr_str} isn't allowed on {$location} -passes-doc-alias-not-an-alias = {$attr_str} is the same as the item's name +passes_doc_alias_not_an_alias = {$attr_str} is the same as the item's name -passes-doc-alias-duplicated = doc alias is duplicated +passes_doc_alias_duplicated = doc alias is duplicated .label = first defined here -passes-doc-alias-not-string-literal = `#[doc(alias("a"))]` expects string literals +passes_doc_alias_not_string_literal = `#[doc(alias("a"))]` expects string literals -passes-doc-alias-malformed = +passes_doc_alias_malformed = doc alias attribute expects a string `#[doc(alias = "a")]` or a list of strings `#[doc(alias("a", "b"))]` -passes-doc-keyword-empty-mod = `#[doc(keyword = "...")]` should be used on empty modules +passes_doc_keyword_empty_mod = `#[doc(keyword = "...")]` should be used on empty modules -passes-doc-keyword-not-mod = `#[doc(keyword = "...")]` should be used on modules +passes_doc_keyword_not_mod = `#[doc(keyword = "...")]` should be used on modules -passes-doc-keyword-invalid-ident = `{$doc_keyword}` is not a valid identifier +passes_doc_keyword_invalid_ident = `{$doc_keyword}` is not a valid identifier -passes-doc-fake-variadic-not-valid = +passes_doc_fake_variadic_not_valid = `#[doc(fake_variadic)]` must be used on the first of a set of tuple or fn pointer trait impls with varying arity -passes-doc-keyword-only-impl = `#[doc(keyword = "...")]` should be used on impl blocks +passes_doc_keyword_only_impl = `#[doc(keyword = "...")]` should be used on impl blocks -passes-doc-inline-conflict-first = this attribute... -passes-doc-inline-conflict-second = ...conflicts with this attribute -passes-doc-inline-conflict = conflicting doc inlining attributes +passes_doc_inline_conflict_first = this attribute... +passes_doc_inline_conflict_second = ...conflicts with this attribute +passes_doc_inline_conflict = conflicting doc inlining attributes .help = remove one of the conflicting attributes -passes-doc-inline-only-use = this attribute can only be applied to a `use` item +passes_doc_inline_only_use = this attribute can only be applied to a `use` item .label = only applicable on `use` items - .not-a-use-item-label = not a `use` item + .not_a_use_item_label = not a `use` item .note = read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#inline-and-no_inline> for more information -passes-doc-attr-not-crate-level = +passes_doc_attr_not_crate_level = `#![doc({$attr_name} = "...")]` isn't allowed as a crate-level attribute -passes-attr-crate-level = this attribute can only be applied at the crate level +passes_attr_crate_level = this attribute can only be applied at the crate level .suggestion = to apply to the crate, use an inner attribute .help = to apply to the crate, use an inner attribute .note = read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information -passes-doc-test-unknown = unknown `doc(test)` attribute `{$path}` +passes_doc_test_unknown = unknown `doc(test)` attribute `{$path}` -passes-doc-test-takes-list = `#[doc(test(...)]` takes a list of attributes +passes_doc_test_takes_list = `#[doc(test(...)]` takes a list of attributes -passes-doc-primitive = `doc(primitive)` should never have been stable +passes_doc_primitive = `doc(primitive)` should never have been stable -passes-doc-test-unknown-any = unknown `doc` attribute `{$path}` +passes_doc_test_unknown_any = unknown `doc` attribute `{$path}` -passes-doc-test-unknown-spotlight = unknown `doc` attribute `{$path}` +passes_doc_test_unknown_spotlight = unknown `doc` attribute `{$path}` .note = `doc(spotlight)` was renamed to `doc(notable_trait)` .suggestion = use `notable_trait` instead - .no-op-note = `doc(spotlight)` is now a no-op + .no_op_note = `doc(spotlight)` is now a no-op -passes-doc-test-unknown-include = unknown `doc` attribute `{$path}` +passes_doc_test_unknown_include = unknown `doc` attribute `{$path}` .suggestion = use `doc = include_str!` instead -passes-doc-invalid = invalid `doc` attribute +passes_doc_invalid = invalid `doc` attribute -passes-pass-by-value = `pass_by_value` attribute should be applied to a struct, enum or type alias +passes_pass_by_value = `pass_by_value` attribute should be applied to a struct, enum or type alias .label = is not a struct, enum or type alias -passes-allow-incoherent-impl = +passes_allow_incoherent_impl = `rustc_allow_incoherent_impl` attribute should be applied to impl items. .label = the only currently supported targets are inherent methods -passes-has-incoherent-inherent-impl = +passes_has_incoherent_inherent_impl = `rustc_has_incoherent_inherent_impls` attribute should be applied to types or traits. .label = only adts, extern types and traits are supported -passes-must-use-async = +passes_must_use_async = `must_use` attribute on `async` functions applies to the anonymous `Future` returned by the function, not the value within .label = this attribute does nothing, the `Future`s returned by async functions are already `must_use` -passes-must-use-no-effect = `#[must_use]` has no effect when applied to {$article} {$target} +passes_must_use_no_effect = `#[must_use]` has no effect when applied to {$article} {$target} -passes-must-not-suspend = `must_not_suspend` attribute should be applied to a struct, enum, or trait +passes_must_not_suspend = `must_not_suspend` attribute should be applied to a struct, enum, or trait .label = is not a struct, enum, or trait -passes-cold = {passes-should-be-applied-to-fn} - .warn = {-passes-previously-accepted} - .label = {passes-should-be-applied-to-fn.label} +passes_cold = {passes_should_be_applied_to_fn} + .warn = {-passes_previously_accepted} + .label = {passes_should_be_applied_to_fn.label} -passes-link = attribute should be applied to an `extern` block with non-Rust ABI - .warn = {-passes-previously-accepted} +passes_link = attribute should be applied to an `extern` block with non-Rust ABI + .warn = {-passes_previously_accepted} .label = not an `extern` block -passes-link-name = attribute should be applied to a foreign function or static - .warn = {-passes-previously-accepted} +passes_link_name = attribute should be applied to a foreign function or static + .warn = {-passes_previously_accepted} .label = not a foreign function or static .help = try `#[link(name = "{$value}")]` instead -passes-no-link = attribute should be applied to an `extern crate` item +passes_no_link = attribute should be applied to an `extern crate` item .label = not an `extern crate` item -passes-export-name = attribute should be applied to a free function, impl method or static +passes_export_name = attribute should be applied to a free function, impl method or static .label = not a free function, impl method or static -passes-rustc-layout-scalar-valid-range-not-struct = attribute should be applied to a struct +passes_rustc_layout_scalar_valid_range_not_struct = attribute should be applied to a struct .label = not a struct -passes-rustc-layout-scalar-valid-range-arg = expected exactly one integer literal argument +passes_rustc_layout_scalar_valid_range_arg = expected exactly one integer literal argument -passes-rustc-legacy-const-generics-only = #[rustc_legacy_const_generics] functions must only have const generics +passes_rustc_legacy_const_generics_only = #[rustc_legacy_const_generics] functions must only have const generics .label = non-const generic parameter -passes-rustc-legacy-const-generics-index = #[rustc_legacy_const_generics] must have one index for each generic parameter +passes_rustc_legacy_const_generics_index = #[rustc_legacy_const_generics] must have one index for each generic parameter .label = generic parameters -passes-rustc-legacy-const-generics-index-exceed = index exceeds number of arguments +passes_rustc_legacy_const_generics_index_exceed = index exceeds number of arguments .label = there {$arg_count -> [one] is *[other] are @@ -181,84 +181,90 @@ passes-rustc-legacy-const-generics-index-exceed = index exceeds number of argume *[other] arguments } -passes-rustc-legacy-const-generics-index-negative = arguments should be non-negative integers +passes_rustc_legacy_const_generics_index_negative = arguments should be non-negative integers -passes-rustc-dirty-clean = attribute requires -Z query-dep-graph to be enabled +passes_rustc_dirty_clean = attribute requires -Z query-dep-graph to be enabled -passes-link-section = attribute should be applied to a function or static - .warn = {-passes-previously-accepted} +passes_link_section = attribute should be applied to a function or static + .warn = {-passes_previously_accepted} .label = not a function or static -passes-no-mangle-foreign = `#[no_mangle]` has no effect on a foreign {$foreign_item_kind} - .warn = {-passes-previously-accepted} +passes_no_mangle_foreign = `#[no_mangle]` has no effect on a foreign {$foreign_item_kind} + .warn = {-passes_previously_accepted} .label = foreign {$foreign_item_kind} .note = symbol names in extern blocks are not mangled .suggestion = remove this attribute -passes-no-mangle = attribute should be applied to a free function, impl method or static - .warn = {-passes-previously-accepted} +passes_no_mangle = attribute should be applied to a free function, impl method or static + .warn = {-passes_previously_accepted} .label = not a free function, impl method or static -passes-repr-ident = meta item in `repr` must be an identifier +passes_repr_ident = meta item in `repr` must be an identifier -passes-repr-conflicting = conflicting representation hints +passes_repr_conflicting = conflicting representation hints -passes-used-static = attribute must be applied to a `static` variable +passes_used_static = attribute must be applied to a `static` variable -passes-used-compiler-linker = `used(compiler)` and `used(linker)` can't be used together +passes_used_compiler_linker = `used(compiler)` and `used(linker)` can't be used together -passes-allow-internal-unstable = attribute should be applied to a macro +passes_allow_internal_unstable = attribute should be applied to a macro .label = not a macro -passes-debug-visualizer-placement = attribute should be applied to a module +passes_debug_visualizer_placement = attribute should be applied to a module -passes-debug-visualizer-invalid = invalid argument - .note-1 = expected: `natvis_file = "..."` - .note-2 = OR - .note-3 = expected: `gdb_script_file = "..."` +passes_debug_visualizer_invalid = invalid argument + .note_1 = expected: `natvis_file = "..."` + .note_2 = OR + .note_3 = expected: `gdb_script_file = "..."` -passes-rustc-allow-const-fn-unstable = attribute should be applied to `const fn` +passes_rustc_allow_const_fn_unstable = attribute should be applied to `const fn` .label = not a `const fn` -passes-rustc-std-internal-symbol = attribute should be applied to functions or statics +passes_rustc_std_internal_symbol = attribute should be applied to functions or statics .label = not a function or static -passes-const-trait = attribute should be applied to a trait +passes_const_trait = attribute should be applied to a trait -passes-stability-promotable = attribute cannot be applied to an expression +passes_stability_promotable = attribute cannot be applied to an expression -passes-deprecated = attribute is ignored here +passes_deprecated = attribute is ignored here -passes-macro-use = `#[{$name}]` only has an effect on `extern crate` and modules +passes_macro_use = `#[{$name}]` only has an effect on `extern crate` and modules -passes-macro-export = `#[macro_export]` only has an effect on macro definitions +passes_macro_export = `#[macro_export]` only has an effect on macro definitions -passes-plugin-registrar = `#[plugin_registrar]` only has an effect on functions +passes_plugin_registrar = `#[plugin_registrar]` only has an effect on functions -passes-unused-empty-lints-note = attribute `{$name}` with an empty list has no effect +passes_unused_empty_lints_note = attribute `{$name}` with an empty list has no effect -passes-unused-no-lints-note = attribute `{$name}` without any lints has no effect +passes_unused_no_lints_note = attribute `{$name}` without any lints has no effect -passes-unused-default-method-body-const-note = +passes_unused_default_method_body_const_note = `default_method_body_is_const` has been replaced with `#[const_trait]` on traits -passes-unused = unused attribute +passes_unused = unused attribute .suggestion = remove this attribute -passes-non-exported-macro-invalid-attrs = attribute should be applied to function or closure +passes_non_exported_macro_invalid_attrs = attribute should be applied to function or closure .label = not a function or closure -passes-unused-duplicate = unused attribute +passes_unused_duplicate = unused attribute .suggestion = remove this attribute .note = attribute also specified here - .warn = {-passes-previously-accepted} + .warn = {-passes_previously_accepted} -passes-unused-multiple = multiple `{$name}` attributes +passes_unused_multiple = multiple `{$name}` attributes .suggestion = remove this attribute .note = attribute also specified here -passes-rustc-lint-opt-ty = `#[rustc_lint_opt_ty]` should be applied to a struct +passes_rustc_lint_opt_ty = `#[rustc_lint_opt_ty]` should be applied to a struct .label = not a struct -passes-rustc-lint-opt-deny-field-access = `#[rustc_lint_opt_deny_field_access]` should be applied to a field +passes_rustc_lint_opt_deny_field_access = `#[rustc_lint_opt_deny_field_access]` should be applied to a field .label = not a field + +passes_link_ordinal = attribute should be applied to a foreign function or static + .label = not a foreign function or static + +passes_collapse_debuginfo = `collapse_debuginfo` attribute should be applied to macro definitions + .label = not a macro definition diff --git a/compiler/rustc_error_messages/locales/en-US/plugin_impl.ftl b/compiler/rustc_error_messages/locales/en-US/plugin_impl.ftl new file mode 100644 index 000000000..8db32a42c --- /dev/null +++ b/compiler/rustc_error_messages/locales/en-US/plugin_impl.ftl @@ -0,0 +1,4 @@ +plugin_impl_load_plugin_error = {$msg} + +plugin_impl_malformed_plugin_attribute = malformed `plugin` attribute + .label = malformed attribute diff --git a/compiler/rustc_error_messages/locales/en-US/privacy.ftl b/compiler/rustc_error_messages/locales/en-US/privacy.ftl index f8a750da9..da987152f 100644 --- a/compiler/rustc_error_messages/locales/en-US/privacy.ftl +++ b/compiler/rustc_error_messages/locales/en-US/privacy.ftl @@ -1,20 +1,22 @@ -privacy-field-is-private = field `{$field_name}` of {$variant_descr} `{$def_path_str}` is private -privacy-field-is-private-is-update-syntax-label = field `{$field_name}` is private -privacy-field-is-private-label = private field +privacy_field_is_private = field `{$field_name}` of {$variant_descr} `{$def_path_str}` is private +privacy_field_is_private_is_update_syntax_label = field `{$field_name}` is private +privacy_field_is_private_label = private field -privacy-item-is-private = {$kind} `{$descr}` is private +privacy_item_is_private = {$kind} `{$descr}` is private .label = private {$kind} -privacy-unnamed-item-is-private = {$kind} is private +privacy_unnamed_item_is_private = {$kind} is private .label = private {$kind} -privacy-in-public-interface = {$vis_descr} {$kind} `{$descr}` in public interface +privacy_in_public_interface = {$vis_descr} {$kind} `{$descr}` in public interface .label = can't leak {$vis_descr} {$kind} - .visibility-label = `{$descr}` declared as {$vis_descr} + .visibility_label = `{$descr}` declared as {$vis_descr} -privacy-from-private-dep-in-public-interface = +privacy_report_access_level = {$descr} + +privacy_from_private_dep_in_public_interface = {$kind} `{$descr}` from private dependency '{$krate}' in public interface -private-in-public-lint = +privacy_private_in_public_lint = {$vis_descr} {$kind} `{$descr}` in public interface (error {$kind -> [trait] E0445 *[other] E0446 diff --git a/compiler/rustc_error_messages/locales/en-US/query_system.ftl b/compiler/rustc_error_messages/locales/en-US/query_system.ftl new file mode 100644 index 000000000..167704e46 --- /dev/null +++ b/compiler/rustc_error_messages/locales/en-US/query_system.ftl @@ -0,0 +1,25 @@ +query_system_reentrant = internal compiler error: re-entrant incremental verify failure, suppressing message + +query_system_increment_compilation = internal compiler error: encountered incremental compilation error with {$dep_node} + .help = This is a known issue with the compiler. Run {$run_cmd} to allow your project to compile + +query_system_increment_compilation_note1 = Please follow the instructions below to create a bug report with the provided information +query_system_increment_compilation_note2 = See <https://github.com/rust-lang/rust/issues/84970> for more information + +query_system_cycle = cycle detected when {$stack_bottom} + +query_system_cycle_usage = cycle used when {$usage} + +query_system_cycle_stack_single = ...which immediately requires {$stack_bottom} again + +query_system_cycle_stack_multiple = ...which again requires {$stack_bottom}, completing the cycle + +query_system_cycle_recursive_ty_alias = type aliases cannot be recursive +query_system_cycle_recursive_ty_alias_help1 = consider using a struct, enum, or union instead to break the cycle +query_system_cycle_recursive_ty_alias_help2 = see <https://doc.rust-lang.org/reference/types.html#recursive-types> for more information + +query_system_cycle_recursive_trait_alias = trait aliases cannot be recursive + +query_system_cycle_which_requires = ...which requires {$desc}... + +query_system_query_overflow = queries overflow the depth limit! diff --git a/compiler/rustc_error_messages/locales/en-US/save_analysis.ftl b/compiler/rustc_error_messages/locales/en-US/save_analysis.ftl new file mode 100644 index 000000000..36c2ff468 --- /dev/null +++ b/compiler/rustc_error_messages/locales/en-US/save_analysis.ftl @@ -0,0 +1 @@ +save_analysis_could_not_open = Could not open `{$file_name}`: `{$err}` diff --git a/compiler/rustc_error_messages/locales/en-US/session.ftl b/compiler/rustc_error_messages/locales/en-US/session.ftl new file mode 100644 index 000000000..76cae3c81 --- /dev/null +++ b/compiler/rustc_error_messages/locales/en-US/session.ftl @@ -0,0 +1,68 @@ +session_incorrect_cgu_reuse_type = + CGU-reuse for `{$cgu_user_name}` is `{$actual_reuse}` but should be {$at_least -> + [one] {"at least "} + *[other] {""} + }`{$expected_reuse}` + +session_cgu_not_recorded = + CGU-reuse for `{$cgu_user_name}` is (mangled: `{$cgu_name}`) was not recorded` + +session_feature_gate_error = {$explain} + +session_feature_diagnostic_for_issue = + see issue #{$n} <https://github.com/rust-lang/rust/issues/{$n}> for more information + +session_feature_diagnostic_help = + add `#![feature({$feature})]` to the crate attributes to enable + +session_not_circumvent_feature = `-Zunleash-the-miri-inside-of-you` may not be used to circumvent feature gates, except when testing error paths in the CTFE engine + +session_profile_use_file_does_not_exist = file `{$path}` passed to `-C profile-use` does not exist. + +session_linker_plugin_lto_windows_not_supported = linker plugin based LTO is not supported together with `-C prefer-dynamic` when targeting Windows-like targets + +session_profile_sample_use_file_does_not_exist = file `{$path}` passed to `-C profile-sample-use` does not exist. + +session_target_requires_unwind_tables = target requires unwind tables, they cannot be disabled with `-C force-unwind-tables=no` + +session_sanitizer_not_supported = {$us} sanitizer is not supported for this target + +session_sanitizers_not_supported = {$us} sanitizers are not supported for this target + +session_cannot_mix_and_match_sanitizers = `-Zsanitizer={$first}` is incompatible with `-Zsanitizer={$second}` + +session_cannot_enable_crt_static_linux = sanitizer is incompatible with statically linked libc, disable it using `-C target-feature=-crt-static` + +session_sanitizer_cfi_enabled = `-Zsanitizer=cfi` requires `-Clto` + +session_unstable_virtual_function_elimination = `-Zvirtual-function-elimination` requires `-Clto` + +session_unsupported_dwarf_version = requested DWARF version {$dwarf_version} is greater than 5 + +session_target_invalid_address_space = invalid address space `{$addr_space}` for `{$cause}` in "data-layout": {$err} + +session_target_invalid_bits = invalid {$kind} `{$bit}` for `{$cause}` in "data-layout": {$err} + +session_target_missing_alignment = missing alignment for `{$cause}` in "data-layout" + +session_target_invalid_alignment = invalid alignment for `{$cause}` in "data-layout": {$err} + +session_target_inconsistent_architecture = inconsistent target specification: "data-layout" claims architecture is {$dl}-endian, while "target-endian" is `{$target}` + +session_target_inconsistent_pointer_width = inconsistent target specification: "data-layout" claims pointers are {$pointer_size}-bit, while "target-pointer-width" is `{$target}` + +session_target_invalid_bits_size = {$err} + +session_target_stack_protector_not_supported = `-Z stack-protector={$stack_protector}` is not supported for target {$target_triple} and will be ignored + +session_split_debuginfo_unstable_platform = `-Csplit-debuginfo={$debuginfo}` is unstable on this platform + +session_file_is_not_writeable = output file {$file} is not writeable -- check its permissions + +session_crate_name_does_not_match = `--crate-name` and `#[crate_name]` are required to match, but `{$s}` != `{$name}` + +session_crate_name_invalid = crate names cannot start with a `-`, but `{$s}` has a leading hyphen + +session_crate_name_empty = crate name must not be empty + +session_invalid_character_in_create_name = invalid character `{$character}` in crate name: `{$crate_name}` diff --git a/compiler/rustc_error_messages/locales/en-US/symbol_mangling.ftl b/compiler/rustc_error_messages/locales/en-US/symbol_mangling.ftl new file mode 100644 index 000000000..b7d48280f --- /dev/null +++ b/compiler/rustc_error_messages/locales/en-US/symbol_mangling.ftl @@ -0,0 +1 @@ +symbol_mangling_test_output = {$kind}({$content}) diff --git a/compiler/rustc_error_messages/locales/en-US/trait_selection.ftl b/compiler/rustc_error_messages/locales/en-US/trait_selection.ftl new file mode 100644 index 000000000..004e0ab18 --- /dev/null +++ b/compiler/rustc_error_messages/locales/en-US/trait_selection.ftl @@ -0,0 +1,26 @@ +trait_selection_dump_vtable_entries = vtable entries for `{$trait_ref}`: {$entries} + +trait_selection_unable_to_construct_constant_value = unable to construct a constant value for the unevaluated constant {$unevaluated} + +trait_selection_auto_deref_reached_recursion_limit = reached the recursion limit while auto-dereferencing `{$ty}` + .label = deref recursion limit reached + .help = consider increasing the recursion limit by adding a `#![recursion_limit = "{$suggested_limit}"]` attribute to your crate (`{$crate_name}`) + +trait_selection_empty_on_clause_in_rustc_on_unimplemented = empty `on`-clause in `#[rustc_on_unimplemented]` + .label = empty on-clause here + +trait_selection_invalid_on_clause_in_rustc_on_unimplemented = invalid `on`-clause in `#[rustc_on_unimplemented]` + .label = invalid on-clause here + +trait_selection_no_value_in_rustc_on_unimplemented = this attribute must have a valid value + .label = expected value here + .note = eg `#[rustc_on_unimplemented(message="foo")]` + +trait_selection_negative_positive_conflict = found both positive and negative implementation of trait `{$trait_desc}`{$self_desc -> + [none] {""} + *[default] {" "}for type `{$self_desc}` + }: + .negative_implementation_here = negative implementation here + .negative_implementation_in_crate = negative implementation in crate `{$negative_impl_cname}` + .positive_implementation_here = positive implementation here + .positive_implementation_in_crate = positive implementation in crate `{$positive_impl_cname}` diff --git a/compiler/rustc_error_messages/locales/en-US/ty_utils.ftl b/compiler/rustc_error_messages/locales/en-US/ty_utils.ftl new file mode 100644 index 000000000..1040ee1c9 --- /dev/null +++ b/compiler/rustc_error_messages/locales/en-US/ty_utils.ftl @@ -0,0 +1,47 @@ +ty_utils_needs_drop_overflow = overflow while checking whether `{$query_ty}` requires drop + +ty_utils_generic_constant_too_complex = overly complex generic constant + .help = consider moving this anonymous constant into a `const` function + .maybe_supported = this operation may be supported in the future + +ty_utils_borrow_not_supported = borrowing is not supported in generic constants + +ty_utils_address_and_deref_not_supported = dereferencing or taking the address is not supported in generic constants + +ty_utils_array_not_supported = array construction is not supported in generic constants + +ty_utils_block_not_supported = blocks are not supported in generic constant + +ty_utils_never_to_any_not_supported = converting nevers to any is not supported in generic constant + +ty_utils_tuple_not_supported = tuple construction is not supported in generic constants + +ty_utils_index_not_supported = indexing is not supported in generic constant + +ty_utils_field_not_supported = field access is not supported in generic constant + +ty_utils_const_block_not_supported = const blocks are not supported in generic constant + +ty_utils_adt_not_supported = struct/enum construction is not supported in generic constants + +ty_utils_pointer_not_supported = pointer casts are not allowed in generic constants + +ty_utils_yield_not_supported = generator control flow is not allowed in generic constants + +ty_utils_loop_not_supported = loops and loop control flow are not supported in generic constants + +ty_utils_box_not_supported = allocations are not allowed in generic constants + +ty_utils_binary_not_supported = unsupported binary operation in generic constants + +ty_utils_logical_op_not_supported = unsupported operation in generic constants, short-circuiting operations would imply control flow + +ty_utils_assign_not_supported = assignment is not supported in generic constants + +ty_utils_closure_and_return_not_supported = closures and function keywords are not supported in generic constants + +ty_utils_control_flow_not_supported = control flow is not supported in generic constants + +ty_utils_inline_asm_not_supported = assembly is not supported in generic constants + +ty_utils_operation_not_supported = unsupported operation in generic constant diff --git a/compiler/rustc_error_messages/locales/en-US/typeck.ftl b/compiler/rustc_error_messages/locales/en-US/typeck.ftl index c61735a57..272731d99 100644 --- a/compiler/rustc_error_messages/locales/en-US/typeck.ftl +++ b/compiler/rustc_error_messages/locales/en-US/typeck.ftl @@ -1,101 +1,101 @@ -typeck-field-multiply-specified-in-initializer = +typeck_field_multiply_specified_in_initializer = field `{$ident}` specified more than once .label = used more than once - .previous-use-label = first use of `{$ident}` + .previous_use_label = first use of `{$ident}` -typeck-unrecognized-atomic-operation = +typeck_unrecognized_atomic_operation = unrecognized atomic operation function: `{$op}` .label = unrecognized atomic operation -typeck-wrong-number-of-generic-arguments-to-intrinsic = +typeck_wrong_number_of_generic_arguments_to_intrinsic = intrinsic has wrong number of {$descr} parameters: found {$found}, expected {$expected} .label = expected {$expected} {$descr} {$expected -> [one] parameter *[other] parameters } -typeck-unrecognized-intrinsic-function = +typeck_unrecognized_intrinsic_function = unrecognized intrinsic function: `{$name}` .label = unrecognized intrinsic -typeck-lifetimes-or-bounds-mismatch-on-trait = +typeck_lifetimes_or_bounds_mismatch_on_trait = lifetime parameters or bounds on {$item_kind} `{$ident}` do not match the trait declaration .label = lifetimes do not match {$item_kind} in trait - .generics-label = lifetimes in impl do not match this {$item_kind} in trait + .generics_label = lifetimes in impl do not match this {$item_kind} in trait -typeck-drop-impl-on-wrong-item = - the `Drop` trait may only be implemented for structs, enums, and unions - .label = must be a struct, enum, or union +typeck_drop_impl_on_wrong_item = + the `Drop` trait may only be implemented for local structs, enums, and unions + .label = must be a struct, enum, or union in the current crate -typeck-field-already-declared = +typeck_field_already_declared = field `{$field_name}` is already declared .label = field already declared - .previous-decl-label = `{$field_name}` first declared here + .previous_decl_label = `{$field_name}` first declared here -typeck-copy-impl-on-type-with-dtor = +typeck_copy_impl_on_type_with_dtor = the trait `Copy` may not be implemented for this type; the type has a destructor .label = `Copy` not allowed on types with destructors -typeck-multiple-relaxed-default-bounds = +typeck_multiple_relaxed_default_bounds = type parameter has more than one relaxed default bound, only one is supported -typeck-copy-impl-on-non-adt = +typeck_copy_impl_on_non_adt = the trait `Copy` may not be implemented for this type .label = type is not a structure or enumeration -typeck-trait-object-declared-with-no-traits = +typeck_trait_object_declared_with_no_traits = at least one trait is required for an object type - .alias-span = this alias does not contain a trait + .alias_span = this alias does not contain a trait -typeck-ambiguous-lifetime-bound = +typeck_ambiguous_lifetime_bound = ambiguous lifetime bound, explicit lifetime bound required -typeck-assoc-type-binding-not-allowed = +typeck_assoc_type_binding_not_allowed = associated type bindings are not allowed here .label = associated type not allowed here -typeck-functional-record-update-on-non-struct = +typeck_functional_record_update_on_non_struct = functional record update syntax requires a struct -typeck-typeof-reserved-keyword-used = +typeck_typeof_reserved_keyword_used = `typeof` is a reserved keyword but unimplemented .suggestion = consider replacing `typeof(...)` with an actual type .label = reserved keyword -typeck-return-stmt-outside-of-fn-body = +typeck_return_stmt_outside_of_fn_body = return statement outside of function body - .encl-body-label = the return is part of this body... - .encl-fn-label = ...not the enclosing function body + .encl_body_label = the return is part of this body... + .encl_fn_label = ...not the enclosing function body -typeck-yield-expr-outside-of-generator = +typeck_yield_expr_outside_of_generator = yield expression outside of generator literal -typeck-struct-expr-non-exhaustive = +typeck_struct_expr_non_exhaustive = cannot create non-exhaustive {$what} using struct expression -typeck-method-call-on-unknown-type = +typeck_method_call_on_unknown_type = the type of this value must be known to call a method on a raw pointer on it -typeck-value-of-associated-struct-already-specified = +typeck_value_of_associated_struct_already_specified = the value of the associated type `{$item_name}` (from trait `{$def_path}`) is already specified .label = re-bound here - .previous-bound-label = `{$item_name}` bound here first + .previous_bound_label = `{$item_name}` bound here first -typeck-address-of-temporary-taken = cannot take address of a temporary +typeck_address_of_temporary_taken = cannot take address of a temporary .label = temporary value -typeck-add-return-type-add = try adding a return type +typeck_add_return_type_add = try adding a return type -typeck-add-return-type-missing-here = a return type might be missing here +typeck_add_return_type_missing_here = a return type might be missing here -typeck-expected-default-return-type = expected `()` because of default return type +typeck_expected_default_return_type = expected `()` because of default return type -typeck-expected-return-type = expected `{$expected}` because of return type +typeck_expected_return_type = expected `{$expected}` because of return type -typeck-unconstrained-opaque-type = unconstrained opaque type +typeck_unconstrained_opaque_type = unconstrained opaque type .note = `{$name}` must be used in combination with a concrete type within the same module -typeck-missing-type-params = +typeck_missing_type_params = the type {$parameterCount -> [one] parameter *[other] parameters @@ -111,15 +111,25 @@ typeck-missing-type-params = [one] type *[other] types } - .no-suggestion-label = missing {$parameterCount -> + .no_suggestion_label = missing {$parameterCount -> [one] reference *[other] references } to {$parameters} .note = because of the default `Self` reference, type parameters must be specified on object types -typeck-manual-implementation = +typeck_manual_implementation = manual implementations of `{$trait_name}` are experimental .label = manual implementations of `{$trait_name}` are experimental .help = add `#![feature(unboxed_closures)]` to the crate attributes to enable -typeck-substs-on-overridden-impl = could not resolve substs on overridden impl +typeck_substs_on_overridden_impl = could not resolve substs on overridden impl + +typeck_unused_extern_crate = + unused extern crate + .suggestion = remove it + +typeck_extern_crate_not_idiomatic = + `extern crate` is not idiomatic in the new edition + .suggestion = convert it to a `{$msg_code}` + +typeck_expected_used_symbol = expected `used`, `used(compiler)` or `used(linker)` diff --git a/compiler/rustc_error_messages/src/lib.rs b/compiler/rustc_error_messages/src/lib.rs index 02bb04d98..b6e0f3faa 100644 --- a/compiler/rustc_error_messages/src/lib.rs +++ b/compiler/rustc_error_messages/src/lib.rs @@ -2,6 +2,11 @@ #![feature(once_cell)] #![feature(rustc_attrs)] #![feature(type_alias_impl_trait)] +#![deny(rustc::untranslatable_diagnostic)] +#![deny(rustc::diagnostic_outside_of_impl)] + +#[macro_use] +extern crate tracing; use fluent_bundle::FluentResource; use fluent_syntax::parser::ParserError; @@ -14,7 +19,6 @@ use std::fmt; use std::fs; use std::io; use std::path::{Path, PathBuf}; -use tracing::{instrument, trace}; #[cfg(not(parallel_compiler))] use std::cell::LazyCell as Lazy; @@ -31,15 +35,32 @@ pub use unic_langid::{langid, LanguageIdentifier}; // Generates `DEFAULT_LOCALE_RESOURCES` static and `fluent_generated` module. fluent_messages! { + ast_lowering => "../locales/en-US/ast_lowering.ftl", + ast_passes => "../locales/en-US/ast_passes.ftl", + attr => "../locales/en-US/attr.ftl", borrowck => "../locales/en-US/borrowck.ftl", builtin_macros => "../locales/en-US/builtin_macros.ftl", const_eval => "../locales/en-US/const_eval.ftl", + driver => "../locales/en-US/driver.ftl", expand => "../locales/en-US/expand.ftl", + session => "../locales/en-US/session.ftl", + interface => "../locales/en-US/interface.ftl", + infer => "../locales/en-US/infer.ftl", lint => "../locales/en-US/lint.ftl", + middle => "../locales/en-US/middle.ftl", + monomorphize => "../locales/en-US/monomorphize.ftl", + metadata => "../locales/en-US/metadata.ftl", parser => "../locales/en-US/parser.ftl", passes => "../locales/en-US/passes.ftl", + plugin_impl => "../locales/en-US/plugin_impl.ftl", privacy => "../locales/en-US/privacy.ftl", + query_system => "../locales/en-US/query_system.ftl", + trait_selection => "../locales/en-US/trait_selection.ftl", + save_analysis => "../locales/en-US/save_analysis.ftl", + ty_utils => "../locales/en-US/ty_utils.ftl", typeck => "../locales/en-US/typeck.ftl", + mir_dataflow => "../locales/en-US/mir_dataflow.ftl", + symbol_mangling => "../locales/en-US/symbol_mangling.ftl", } pub use fluent_generated::{self as fluent, DEFAULT_LOCALE_RESOURCES}; |