@@ -24,9 +24,17 @@ expand_cannot_be_name_of_macro =
24
24
expand_collapse_debuginfo_illegal =
25
25
illegal value for attribute #[collapse_debuginfo(no|external|yes)]
26
26
27
+ expand_concat_generated_invalid_ident = `{"${concat(..)} "}` is not generating a valid identifier
28
+
29
+ expand_concat_raw_ident = `{"${concat(..)} "}` currently does not support raw identifiers
30
+
31
+ expand_concat_too_few_args = `concat` must have at least two elements
32
+
27
33
expand_count_repetition_misplaced =
28
34
`count` can not be placed inside the inner-most repetition
29
35
36
+ expand_count_with_comma_no_index = `count` followed by a comma must have an associated index indicating its depth
37
+
30
38
expand_custom_attribute_cannot_be_applied =
31
39
custom attributes cannot be applied to {$kind ->
32
40
[statement] statements
@@ -37,22 +45,37 @@ expand_custom_attribute_panicked =
37
45
custom attribute panicked
38
46
.help = message: {$message}
39
47
48
+ expand_doc_comments_ignored_in_matcher_position = doc comments are ignored in matcher position
49
+
50
+ expand_dollar_or_metavar_in_lhs = unexpected token: {$token}
51
+ .note = `$$` and meta-variable expressions are not allowed inside macro parameter definitions
52
+
53
+ expand_duplicate_binding_name = duplicated bind name: {$bind}
54
+
40
55
expand_duplicate_matcher_binding = duplicate matcher binding
41
56
.label = duplicate binding
42
57
.label2 = previous binding
43
58
44
59
expand_empty_delegation_mac =
45
60
empty {$kind} delegation is not supported
46
61
62
+ expand_expected_comma = expected comma
63
+
64
+ expand_expected_identifier = expected identifier, found `{$found}`
65
+
47
66
expand_expected_paren_or_brace =
48
67
expected `(` or `{"{"}`, found `{$token}`
49
68
69
+ expand_expected_repetition_operator = expected one of: `*`, `+`, or `?`
70
+
50
71
expand_explain_doc_comment_inner =
51
72
inner doc comments expand to `#![doc = "..."]`, which is what this macro attempted to match
52
73
53
74
expand_explain_doc_comment_outer =
54
75
outer doc comments expand to `#[doc = "..."]`, which is what this macro attempted to match
55
76
77
+ expand_expr_2021_unstable = fragment specifier `expr_2021` is unstable
78
+
56
79
expand_expr_repeat_no_syntax_vars =
57
80
attempted to repeat an expression containing no syntax variables matched as repeating at this depth
58
81
@@ -86,9 +109,30 @@ expand_invalid_cfg_no_parens = `cfg` is not followed by parentheses
86
109
expand_invalid_cfg_no_predicate = `cfg` predicate is not specified
87
110
expand_invalid_cfg_predicate_literal = `cfg` predicate key cannot be a literal
88
111
112
+ expand_invalid_concat_arg_type = metavariables of {"`${concat(..)} `"} must be of type `ident`, `literal` or `tt`
113
+ .note = currently only string literals are supported
114
+
115
+ expand_invalid_follow = `${$name}:{$kind}` {$only_option ->
116
+ [true] is
117
+ *[false] may be
118
+ } followed by `{$next}`, which is not allowed for `{$kind}` fragments
119
+ .label = not allowed after `{$kind}` fragments
120
+ .suggestion = try a `pat_param` fragment specifier instead
121
+ .note = {$num_possible ->
122
+ [one] only {$possible} is allowed after `{$kind}` fragments
123
+ *[other] allowed there are: {$possible}
124
+ }
125
+
89
126
expand_invalid_fragment_specifier =
90
127
invalid fragment specifier `{$fragment}`
91
- .help = { $help }
128
+ .help_expr_2021 = fragment specifier `expr_2021` requires Rust 2021 or later
129
+
130
+ expand_label_conflicting_repetition = conflicting repetition
131
+
132
+ expand_label_error_while_parsing_argument = while parsing argument for this `{$kind}` macro fragment
133
+
134
+ expand_label_expected_repetition = expected repetition
135
+ expand_label_previous_declaration = previous declaration
92
136
93
137
expand_macro_body_stability =
94
138
macros cannot have body stability attributes
@@ -102,19 +146,51 @@ expand_macro_const_stability =
102
146
103
147
expand_macro_expands_to_match_arm = macros cannot expand to match arms
104
148
149
+ expand_macro_rhs_must_be_delimited = macro rhs must be delimited
150
+
105
151
expand_malformed_feature_attribute =
106
152
malformed `feature` attribute input
107
153
.expected = expected just one word
108
154
109
- expand_meta_var_dif_seq_matchers = { $msg }
155
+ expand_match_failure_missing_tokens = missing tokens in macro arguments
156
+ expand_match_failure_unexpected_token = no rules expected this token in macro call
157
+
158
+ expand_meta_var_dif_seq_matchers =
159
+ meta-variable `{$var1_id}` repeats {$var1_len} {$var1_len ->
160
+ [one] time
161
+ *[count] times
162
+ }, but `{$var2_id}` repeats {$var2_len} {$var2_len ->
163
+ [one] time
164
+ *[count] times
165
+ }
166
+
167
+ expand_meta_var_expr_concat_unstable = the `concat` meta-variable expression is unstable
168
+
169
+ expand_meta_var_expr_depth_not_literal = meta-variable expression depth must be a literal
170
+
171
+ expand_meta_var_expr_depth_suffixed = only unsuffixed integer literals are supported in meta-variable expressions
172
+
173
+ expand_meta_var_expr_expected_identifier = expected identifier, found `{$found}`
174
+ .suggestion = try removing `{$found}`
175
+
176
+ expand_meta_var_expr_needs_parens = meta-variable expression parameter must be wrapped in parentheses
177
+
178
+ expand_meta_var_expr_out_of_bounds = {$max ->
179
+ [0] meta-variable expression `{$ty}` with depth parameter must be called inside of a macro repetition
180
+ *[other] depth parameter of meta-variable expression `{$ty}` must be less than {$max}
181
+ }
182
+
183
+ expand_meta_var_expr_unexpected_token = unexpected token: {$tt}
184
+ .note = meta-variable expression must not have trailing tokens
110
185
111
186
expand_meta_var_expr_unrecognized_var =
112
187
variable `{$key}` is not recognized in meta-variable expression
113
188
189
+ expand_meta_var_expr_unstable = meta-variable expressions are unstable
190
+
114
191
expand_missing_fragment_specifier = missing fragment specifier
115
192
.note = fragment specifiers must be specified in the 2024 edition
116
193
.suggestion_add_fragspec = try adding a specifier here
117
- .valid = { $valid }
118
194
119
195
expand_module_circular =
120
196
circular modules: {$modules}
@@ -132,9 +208,22 @@ expand_module_multiple_candidates =
132
208
file for module `{$name}` found at both "{$default_path}" and "{$secondary_path}"
133
209
.help = delete or rename one of them to remove the ambiguity
134
210
211
+ expand_multiple_parsing_options =
212
+ local ambiguity when calling macro `{$macro_name}`: multiple parsing options: built-in NTs {$nts}{$n ->
213
+ [0] .
214
+ [one] {""} or {$n} other option
215
+ *[other] {""} or {$n} other options
216
+ }
217
+
218
+ expand_multiple_successful_parses = ambiguity: multiple successful parses
219
+
220
+ expand_multiple_transparency_attrs = multiple macro transparency attributes
221
+
135
222
expand_must_repeat_once =
136
223
this must repeat at least once
137
224
225
+ expand_nested_meta_var_expr_without_dollar = meta-variables within meta-variable expressions must be referenced using a dollar sign
226
+
138
227
expand_non_inline_modules_in_proc_macro_input_are_unstable =
139
228
non-inline modules in proc macro input are unstable
140
229
@@ -144,6 +233,10 @@ expand_not_a_meta_item =
144
233
expand_only_one_word =
145
234
must only be one word
146
235
236
+ expand_parse_failure_expected_token = expected `{$expected}`, found `{$found}`
237
+ expand_parse_failure_unexpected_eof = unexpected end of macro invocation
238
+ expand_parse_failure_unexpected_token = no rules expected the token `{$found}`
239
+
147
240
expand_proc_macro_back_compat = using an old version of `{$crate_name}`
148
241
.note = older versions of the `{$crate_name}` crate no longer compile; please update to `{$crate_name}` v{$fixed_version}, or switch to one of the `{$crate_name}` alternatives
149
242
@@ -158,6 +251,8 @@ expand_proc_macro_panicked =
158
251
proc macro panicked
159
252
.help = message: {$message}
160
253
254
+ expand_question_mark_with_separator = the `?` macro repetition operator does not take a separator
255
+
161
256
expand_recursion_limit_reached =
162
257
recursion limit reached while expanding `{$descr}`
163
258
.help = consider increasing the recursion limit by adding a `#![recursion_limit = "{$suggested_limit}"]` attribute to your crate (`{$crate_name}`)
@@ -168,14 +263,28 @@ expand_remove_expr_not_supported =
168
263
expand_remove_node_not_supported =
169
264
removing {$descr} is not supported in this position
170
265
266
+ expand_repetition_matches_empty_token_tree = repetition matches empty token tree
267
+
171
268
expand_resolve_relative_path =
172
269
cannot resolve relative path in non-file source `{$path}`
173
270
174
271
expand_trace_macro = trace_macro
175
272
273
+ expand_unbalanced_delims_around_matcher = invalid macro matcher; matchers must be contained in balanced delimiters
274
+
275
+ expand_unknown_macro_transparency = unknown macro transparency: `{$value}`
276
+
277
+ expand_unrecognized_meta_var_expr = unrecognized meta-variable expression
278
+ .help = supported expressions are count, ignore, index and len
279
+
280
+ expand_unsupported_concat_elem = expected identifier or string literal
281
+
176
282
expand_unsupported_key_value =
177
283
key-value macro attributes are not supported
178
284
285
+ expand_valid_fragment_names_2021 = valid fragment specifiers are `ident`, `block`, `stmt`, `expr`, `expr_2021`, `pat`, `ty`, `lifetime`, `literal`, `path`, `meta`, `tt`, `item` and `vis`
286
+ expand_valid_fragment_names_other = valid fragment specifiers are `ident`, `block`, `stmt`, `expr`, `pat`, `ty`, `lifetime`, `literal`, `path`, `meta`, `tt`, `item` and `vis`
287
+
179
288
expand_var_still_repeating =
180
289
variable `{$ident}` is still repeating at this depth
181
290
0 commit comments