@@ -11,6 +11,8 @@ resolve_added_macro_use =
11
11
resolve_ancestor_only =
12
12
visibilities can only be restricted to ancestor modules
13
13
14
+ resolve_arguments_macro_use_not_allowed = arguments to `macro_use` are not allowed here
15
+
14
16
resolve_associated_const_with_similar_name_exists =
15
17
there is an associated constant with a similar name
16
18
@@ -20,6 +22,10 @@ resolve_associated_fn_with_similar_name_exists =
20
22
resolve_associated_type_with_similar_name_exists =
21
23
there is an associated type with a similar name
22
24
25
+ resolve_attempt_to_define_builtin_macro_twice =
26
+ attempted to define built-in macro more than once
27
+ .note = previously defined here
28
+
23
29
resolve_attempt_to_use_non_constant_value_in_constant =
24
30
attempt to use a non-constant value in a constant
25
31
@@ -32,6 +38,11 @@ resolve_attempt_to_use_non_constant_value_in_constant_with_suggestion =
32
38
resolve_attempt_to_use_non_constant_value_in_constant_without_suggestion =
33
39
this would need to be a `{ $suggestion } `
34
40
41
+ resolve_attributes_starting_with_rustc_are_reserved =
42
+ attributes starting with `rustc` are reserved for use by the `rustc` compiler
43
+
44
+ resolve_bad_macro_import = bad macro import
45
+
35
46
resolve_binding_in_never_pattern =
36
47
never patterns cannot contain variable bindings
37
48
.suggestion = use a wildcard `_` instead
@@ -62,12 +73,19 @@ resolve_cannot_determine_macro_resolution =
62
73
cannot determine resolution for the { $kind } `{ $path } `
63
74
.note = import resolution is stuck, try simplifying macro imports
64
75
76
+ resolve_cannot_find_builtin_macro_with_name =
77
+ cannot find a built-in macro with name `{ $ident } `
78
+
65
79
resolve_cannot_find_ident_in_this_scope =
66
80
cannot find { $expected } `{ $ident } ` in this scope
67
81
68
82
resolve_cannot_glob_import_possible_crates =
69
83
cannot glob-import all possible crates
70
84
85
+ resolve_cannot_use_through_an_import =
86
+ cannot use { $article } { $descr } through an import
87
+ .note = the { $descr } imported here
88
+
71
89
resolve_change_import_binding =
72
90
you can use `as` to change the binding name of the import
73
91
@@ -80,6 +98,12 @@ resolve_consider_adding_macro_export =
80
98
resolve_consider_declaring_with_pub =
81
99
consider declaring type or module `{ $ident } ` with `pub`
82
100
101
+ resolve_consider_making_the_field_public =
102
+ { $number_of_fields ->
103
+ [ one ] consider making the field publicly accessible
104
+ *[ other ] consider making the fields publicly accessible
105
+ }
106
+
83
107
resolve_consider_marking_as_pub =
84
108
consider marking `{ $ident } ` as `pub` in the imported module
85
109
@@ -100,17 +124,44 @@ resolve_const_param_in_non_trivial_anon_const =
100
124
resolve_const_param_in_ty_of_const_param =
101
125
const parameters may not be used in the type of const parameters
102
126
103
- resolve_expected_found =
127
+ resolve_constructor_private_if_any_field_private =
128
+ a constructor is private if any of the fields is private
129
+
130
+ resolve_elided_anonymous_lifetime_report_error =
131
+ `&` without an explicit lifetime name cannot be used here
132
+ .label = explicit lifetime name needed here
133
+
134
+ resolve_elided_anonymous_lifetime_report_error_suggestion =
135
+ consider introducing a higher-ranked lifetime here
136
+
137
+ resolve_expected_module_found =
104
138
expected module, found { $res } `{ $path_str } `
105
139
.label = not a module
106
140
141
+ resolve_explicit_anonymous_lifetime_report_error =
142
+ `'_` cannot be used here
143
+ .label = `'_` is a reserved lifetime name
144
+
107
145
resolve_explicit_unsafe_traits =
108
146
unsafe traits like `{ $ident } ` should be implemented explicitly
109
147
148
+ resolve_extern_crate_loading_macro_not_at_crate_root =
149
+ an `extern crate` loading macros must be at the crate root
150
+
151
+ resolve_extern_crate_self_requires_renaming =
152
+ `extern crate self;` requires renaming
153
+ .suggestion = rename the `self` crate to be able to import it
154
+
110
155
resolve_forward_declared_generic_param =
111
156
generic parameters with a default cannot use forward declared identifiers
112
157
.label = defaulted generic parameters cannot be forward declared
113
158
159
+ resolve_found_an_item_configured_out =
160
+ found an item that was configured out
161
+
162
+ resolve_generic_arguments_in_macro_path =
163
+ generic arguments in macro path
164
+
114
165
resolve_generic_params_from_outer_item =
115
166
can't use { $is_self ->
116
167
[ true ] `Self`
@@ -135,7 +186,6 @@ resolve_generic_params_from_outer_item_static = a `static` is a separate item fr
135
186
136
187
resolve_generic_params_from_outer_item_ty_param = type parameter from outer item
137
188
138
-
139
189
resolve_ident_bound_more_than_once_in_parameter_list =
140
190
identifier `{ $identifier } ` is bound more than once in this parameter list
141
191
.label = used as parameter more than once
@@ -144,8 +194,18 @@ resolve_ident_bound_more_than_once_in_same_pattern =
144
194
identifier `{ $identifier } ` is bound more than once in the same pattern
145
195
.label = used in a pattern more than once
146
196
197
+ resolve_ident_imported_here_but_it_is_desc =
198
+ `{ $imported_ident } ` is imported here, but it is { $imported_ident_desc }
199
+
200
+ resolve_ident_in_scope_but_it_is_desc =
201
+ `{ $imported_ident } ` is in scope, but it is { $imported_ident_desc }
202
+
203
+ resolve_implicit_elided_lifetimes_not_allowed_here = implicit elided lifetime not allowed here
204
+
147
205
resolve_imported_crate = `$crate` may not be imported
148
206
207
+ resolve_imported_macro_not_found = imported macro not found
208
+
149
209
resolve_imports_cannot_refer_to =
150
210
imports cannot refer to { $what }
151
211
@@ -161,6 +221,13 @@ resolve_is_not_directly_importable =
161
221
`{ $target } ` is not directly importable
162
222
.label = cannot be imported directly
163
223
224
+ resolve_is_private =
225
+ { $ident_descr } `{ $ident } ` is private
226
+ .label = private { $ident_descr }
227
+
228
+ resolve_item_was_behind_feature =
229
+ the item is gated behind the `{ $feature } ` feature
230
+
164
231
resolve_items_in_traits_are_not_importable =
165
232
items in traits are not importable
166
233
@@ -183,11 +250,23 @@ resolve_lowercase_self =
183
250
resolve_macro_defined_later =
184
251
a macro with the same name exists, but it appears later at here
185
252
253
+ resolve_macro_expanded_extern_crate_cannot_shadow_extern_arguments =
254
+ macro-expanded `extern crate` items cannot shadow names passed with `--extern`
255
+
186
256
resolve_macro_expected_found =
187
257
expected { $expected } , found { $found } `{ $macro_path } `
258
+ .label = not { $article } { $expected }
259
+
260
+ resolve_macro_extern_deprecated =
261
+ `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
262
+ .help = try an outer attribute: `#[macro_use]`
188
263
189
264
resolve_macro_use_extern_crate_self = `#[macro_use]` is not supported on `extern crate self`
190
265
266
+ resolve_macro_use_name_already_in_use =
267
+ `{ $name } ` is already in scope
268
+ .note = macro-expanded `#[macro_use]`s may not shadow existing macros (see RFC 1560)
269
+
191
270
resolve_method_not_member_of_trait =
192
271
method `{ $method } ` is not a member of trait `{ $trait_ } `
193
272
.label = not a member of trait `{ $trait_ } `
@@ -197,11 +276,45 @@ resolve_missing_macro_rules_name = maybe you have forgotten to define a name for
197
276
resolve_module_only =
198
277
visibility must resolve to a module
199
278
279
+ resolve_name_defined_multiple_time =
280
+ the name `{ $name } ` is defined multiple times
281
+ .note = `{ $name } ` must be defined only once in the { $descr } namespace of this { $container }
282
+
283
+ resolve_name_defined_multiple_time_old_binding_definition =
284
+ previous definition of the { $old_kind } `{ $name } ` here
285
+
286
+ resolve_name_defined_multiple_time_old_binding_import =
287
+ previous import of the { $old_kind } `{ $name } ` here
288
+
289
+ resolve_name_defined_multiple_time_redefined =
290
+ `{ $name } ` redefined here
291
+
292
+ resolve_name_defined_multiple_time_reimported =
293
+ `{ $name } ` reimported here
294
+
200
295
resolve_name_is_already_used_as_generic_parameter =
201
296
the name `{ $name } ` is already used for a generic parameter in this item's generic parameters
202
297
.label = already used
203
298
.first_use_of_name = first use of `{ $name } `
204
299
300
+ resolve_name_reserved_in_attribute_namespace =
301
+ name `{ $ident } ` is reserved in attribute namespace
302
+
303
+ resolve_note_and_refers_to_the_item_defined_here =
304
+ { $first ->
305
+ [ true ] { $dots ->
306
+ [ true ] the { $binding_descr } `{ $binding_name } ` is defined here...
307
+ *[ false ] the { $binding_descr } `{ $binding_name } ` is defined here
308
+ }
309
+ *[ false ] { $dots ->
310
+ [ true ] ...and refers to the { $binding_descr } `{ $binding_name } ` which is defined here...
311
+ *[ false ] ...and refers to the { $binding_descr } `{ $binding_name } ` which is defined here
312
+ }
313
+ }
314
+
315
+ resolve_outer_ident_is_not_publicly_reexported =
316
+ { $outer_ident_descr } `{ $outer_ident } ` is not publicly re-exported
317
+
205
318
resolve_param_in_enum_discriminant =
206
319
generic parameters may not be used in enum discriminant values
207
320
.label = cannot perform const operation using `{ $name } `
@@ -217,6 +330,8 @@ resolve_param_in_ty_of_const_param =
217
330
the type of const parameters must not depend on other generic parameters
218
331
.label = the type must not depend on the parameter `{ $name } `
219
332
333
+ resolve_pattern_doesnt_bind_name = pattern doesn't bind `{ $name } `
334
+
220
335
resolve_proc_macro_same_crate = can't use a procedural macro from the same crate that defines it
221
336
.help = you can define integration tests in a directory named `tests`
222
337
@@ -233,6 +348,8 @@ resolve_relative_2018 =
233
348
resolve_remove_surrounding_derive =
234
349
remove from the surrounding `derive()`
235
350
351
+ resolve_remove_unnecessary_import = remove unnecessary import
352
+
236
353
resolve_self_import_can_only_appear_once_in_the_list =
237
354
`self` import can only appear once in an import list
238
355
.label = can only appear once in an import list
@@ -254,16 +371,43 @@ resolve_self_in_generic_param_default =
254
371
generic parameters cannot use `Self` in their defaults
255
372
.label = `Self` in generic parameter default
256
373
374
+ resolve_similarly_named_defined_here =
375
+ similarly named { $candidate_descr } `{ $candidate } ` defined here
376
+
377
+ resolve_single_item_defined_here =
378
+ { $candidate_descr } `{ $candidate } ` defined here
379
+
380
+ resolve_static_lifetime_is_reserved = invalid lifetime parameter name: `{ $lifetime } `
381
+ .label = 'static is a reserved lifetime name
382
+
383
+ resolve_suggestion_import_ident_directly =
384
+ import `{ $ident } ` directly
385
+
386
+ resolve_suggestion_import_ident_through_reexport =
387
+ import `{ $ident } ` through the re-export
388
+
257
389
resolve_tool_module_imported =
258
390
cannot use a tool module through an import
259
391
.note = the tool module imported here
260
392
393
+ resolve_tool_only_accepts_identifiers =
394
+ `{ $tool } ` only accepts identifiers
395
+ .label = not an identifier
396
+
397
+ resolve_tool_was_already_registered =
398
+ tool `{ $tool } ` was already registered
399
+ .label = already registered here
400
+
261
401
resolve_trait_impl_duplicate =
262
402
duplicate definitions with name `{ $name } `:
263
403
.label = duplicate definition
264
404
.old_span_label = previous definition here
265
405
.trait_item_span = item in trait
266
406
407
+ resolve_trait_impl_mismatch =
408
+ item `{ $name } ` is an associated { $kind } , which doesn't match its trait `{ $trait_path } `
409
+ .label = does not match trait
410
+ .trait_impl_mismatch_label_item = item in trait
267
411
resolve_try_using_similarly_named_label =
268
412
try using similarly named label
269
413
@@ -284,12 +428,18 @@ resolve_undeclared_label =
284
428
use of undeclared label `{ $name } `
285
429
.label = undeclared label `{ $name } `
286
430
431
+ resolve_underscore_lifetime_is_reserved = `'_` cannot be used here
432
+ .label = `'_` is a reserved lifetime name
433
+
287
434
resolve_unexpected_res_change_ty_to_const_param_sugg =
288
435
you might have meant to write a const parameter here
289
436
290
437
resolve_unexpected_res_use_at_op_in_slice_pat_with_range_sugg =
291
438
if you meant to collect the rest of the slice in `{ $ident } `, use the at operator
292
439
440
+ resolve_unnamed_crate_root_import =
441
+ crate root imports need to be explicitly named: `use crate as name;`
442
+
293
443
resolve_unreachable_label =
294
444
use of unreachable label `{ $name } `
295
445
.label = unreachable label `{ $name } `
@@ -312,3 +462,8 @@ resolve_variable_bound_with_different_mode =
312
462
variable `{ $variable_name } ` is bound inconsistently across alternatives separated by `|`
313
463
.label = bound in different ways
314
464
.first_binding_span = first binding
465
+
466
+ resolve_variable_is_not_bound_in_all_patterns =
467
+ variable `{ $name } ` is not bound in all patterns
468
+
469
+ resolve_variable_not_in_all_patterns = variable not in all patterns
0 commit comments