about summary refs log tree commit diff
path: root/compiler/rustc_resolve/messages.ftl
diff options
context:
space:
mode:
authorJean CASPAR <jean.caspar67610@gmail.com>2024-03-24 21:53:18 +0000
committerJean CASPAR <jean.caspar67610@gmail.com>2024-04-13 14:50:25 +0100
commitcec9f7f71659360e66933d4fb782d37938d00f09 (patch)
tree820982497418e02e42b3c990651906fb3dbfda6e /compiler/rustc_resolve/messages.ftl
parent4226dc2045717ba8570e56c446557ce808b10916 (diff)
downloadrust-cec9f7f71659360e66933d4fb782d37938d00f09.tar.gz
rust-cec9f7f71659360e66933d4fb782d37938d00f09.zip
Migrate more diagnostics
Diffstat (limited to 'compiler/rustc_resolve/messages.ftl')
-rw-r--r--compiler/rustc_resolve/messages.ftl106
1 files changed, 106 insertions, 0 deletions
diff --git a/compiler/rustc_resolve/messages.ftl b/compiler/rustc_resolve/messages.ftl
index c737ad86e46..95592b1c1dd 100644
--- a/compiler/rustc_resolve/messages.ftl
+++ b/compiler/rustc_resolve/messages.ftl
@@ -38,6 +38,9 @@ resolve_attempt_to_use_non_constant_value_in_constant_with_suggestion =
 resolve_attempt_to_use_non_constant_value_in_constant_without_suggestion =
     this would need to be a `{$suggestion}`
 
+resolve_attributes_starting_with_rustc_are_reserved =
+    attributes starting with `rustc` are reserved for use by the `rustc` compiler
+
 resolve_bad_macro_import = bad macro import
 
 resolve_binding_in_never_pattern =
@@ -70,12 +73,19 @@ resolve_cannot_determine_macro_resolution =
     cannot determine resolution for the {$kind} `{$path}`
     .note = import resolution is stuck, try simplifying macro imports
 
+resolve_cannot_find_builtin_macro_with_name =
+    cannot find a built-in macro with name `{$ident}`
+
 resolve_cannot_find_ident_in_this_scope =
     cannot find {$expected} `{$ident}` in this scope
 
 resolve_cannot_glob_import_possible_crates =
     cannot glob-import all possible crates
 
+resolve_cannot_use_through_an_import =
+    cannot use {$article} {$descr} through an import
+    .note = the {$descr} imported here
+
 resolve_change_import_binding =
     you can use `as` to change the binding name of the import
 
@@ -88,6 +98,12 @@ resolve_consider_adding_macro_export =
 resolve_consider_declaring_with_pub =
     consider declaring type or module `{$ident}` with `pub`
 
+resolve_consider_making_the_field_public =
+    { $number_of_fields ->
+        [one] consider making the field publicly accessible
+        *[other] consider making the fields publicly accessible
+    }
+
 resolve_consider_marking_as_pub =
     consider marking `{$ident}` as `pub` in the imported module
 
@@ -108,6 +124,9 @@ resolve_const_param_in_non_trivial_anon_const =
 resolve_const_param_in_ty_of_const_param =
     const parameters may not be used in the type of const parameters
 
+resolve_constructor_private_if_any_field_private =
+    a constructor is private if any of the fields is private
+
 resolve_elided_anonymous_lifetime_report_error =
     `&` without an explicit lifetime name cannot be used here
     .label = explicit lifetime name needed here
@@ -133,10 +152,20 @@ resolve_extern_crate_self_requires_renaming =
     `extern crate self;` requires renaming
     .suggestion = rename the `self` crate to be able to import it
 
+resolve_failed_resolve_unresolve_import = failed to resolve: unresolved import
+
+resolve_failed_resolve_unresolve_import_label = unresolved import
+
 resolve_forward_declared_generic_param =
     generic parameters with a default cannot use forward declared identifiers
     .label = defaulted generic parameters cannot be forward declared
 
+resolve_found_an_item_configured_out =
+    found an item that was configured out
+
+resolve_generic_arguments_in_macro_path =
+    generic arguments in macro path
+
 resolve_generic_params_from_outer_item =
     can't use {$is_self ->
         [true] `Self`
@@ -171,6 +200,12 @@ resolve_ident_bound_more_than_once_in_same_pattern =
     identifier `{$identifier}` is bound more than once in the same pattern
     .label = used in a pattern more than once
 
+resolve_ident_imported_here_but_it_is_desc =
+    `{$imported_ident}` is imported here, but it is {$imported_ident_desc}
+
+resolve_ident_in_scope_but_it_is_desc =
+    `{$imported_ident}` is in scope, but it is {$imported_ident_desc}
+
 resolve_imported_crate = `$crate` may not be imported
 
 resolve_imported_macro_not_found = imported macro not found
@@ -190,6 +225,13 @@ resolve_is_not_directly_importable =
     `{$target}` is not directly importable
     .label = cannot be imported directly
 
+resolve_is_private =
+    {$ident_descr} `{$ident}` is private
+    .label = private {$ident_descr}
+
+resolve_item_was_behind_feature =
+    the item is gated behind the `{$feature}` feature
+
 resolve_items_in_traits_are_not_importable =
     items in traits are not importable
 
@@ -217,6 +259,7 @@ resolve_macro_expanded_extern_crate_cannot_shadow_extern_arguments =
 
 resolve_macro_expected_found =
     expected {$expected}, found {$found} `{$macro_path}`
+    .label = not {$article} {$expected}
 
 resolve_macro_extern_deprecated =
     `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
@@ -237,11 +280,45 @@ resolve_missing_macro_rules_name = maybe you have forgotten to define a name for
 resolve_module_only =
     visibility must resolve to a module
 
+resolve_name_defined_multiple_time =
+    the name `{$name}` is defined multiple times
+    .note = `{$name}` must be defined only once in the {$descr} namespace of this {$container}
+
+resolve_name_defined_multiple_time_old_binding_definition =
+    previous definition of the {$old_kind} `{$name}` here
+
+resolve_name_defined_multiple_time_old_binding_import =
+    previous import of the {$old_kind} `{$name}` here
+
+resolve_name_defined_multiple_time_redefined =
+    `{$name}` redefined here
+
+resolve_name_defined_multiple_time_reimported =
+    `{$name}` reimported here
+
 resolve_name_is_already_used_as_generic_parameter =
     the name `{$name}` is already used for a generic parameter in this item's generic parameters
     .label = already used
     .first_use_of_name = first use of `{$name}`
 
+resolve_name_reserved_in_attribute_namespace =
+    name `{$ident}` is reserved in attribute namespace
+
+resolve_note_and_refers_to_the_item_defined_here =
+    {$first ->
+        [true] {$dots ->
+            [true] the {$binding_descr} `{$binding_name}` is defined here...
+            *[false] the {$binding_descr} `{$binding_name}` is defined here
+        }
+        *[false] {$dots ->
+            [true] ...and refers to the {$binding_descr} `{$binding_name}` which is defined here...
+            *[false] ...and refers to the {$binding_descr} `{$binding_name}` which is defined here
+        }
+    }
+
+resolve_outer_ident_is_not_publicly_reexported =
+    {$outer_ident_descr} `{$outer_ident}` is not publicly re-exported
+
 resolve_param_in_enum_discriminant =
     generic parameters may not be used in enum discriminant values
     .label = cannot perform const operation using `{$name}`
@@ -275,6 +352,8 @@ resolve_relative_2018 =
 resolve_remove_surrounding_derive =
     remove from the surrounding `derive()`
 
+resolve_remove_unnecessary_import = remove unnecessary import
+
 resolve_self_import_can_only_appear_once_in_the_list =
     `self` import can only appear once in an import list
     .label = can only appear once in an import list
@@ -296,13 +375,33 @@ resolve_self_in_generic_param_default =
     generic parameters cannot use `Self` in their defaults
     .label = `Self` in generic parameter default
 
+resolve_similarly_named_defined_here =
+    similarly named {$candidate_descr} `{$candidate}` defined here
+
+resolve_single_item_defined_here =
+    {$candidate_descr} `{$candidate}` defined here
+
 resolve_static_lifetime_is_reserved = invalid lifetime parameter name: `{$lifetime}`
     .label = 'static is a reserved lifetime name
 
+resolve_suggestion_import_ident_directly =
+    import `{$ident}` directly
+
+resolve_suggestion_import_ident_through_reexport =
+    import `{$ident}` through the re-export
+
 resolve_tool_module_imported =
     cannot use a tool module through an import
     .note = the tool module imported here
 
+resolve_tool_only_accepts_identifiers =
+    `{$tool}` only accepts identifiers
+    .label = not an identifier
+
+resolve_tool_was_already_registered =
+    tool `{$tool}` was already registered
+    .label = already registered here
+
 resolve_trait_impl_duplicate =
     duplicate definitions with name `{$name}`:
     .label = duplicate definition
@@ -368,3 +467,10 @@ resolve_variable_is_not_bound_in_all_patterns =
     variable `{$name}` is not bound in all patterns
 
 resolve_variable_not_in_all_patterns = variable not in all patterns
+
+resolve_you_could_import_this_desc = you could import this {$desc}
+
+resolve_trait_impl_mismatch =
+    item `{$name}` is an associated {$kind}, which doesn't match its trait `{$trait_path}`
+    .label = does not match trait
+    .trait_impl_mismatch_label_item = item in trait
\ No newline at end of file