]> git.proxmox.com Git - rustc.git/blame - compiler/rustc_builtin_macros/messages.ftl
New upstream version 1.71.1+dfsg1
[rustc.git] / compiler / rustc_builtin_macros / messages.ftl
CommitLineData
49aad941 1builtin_macros_alloc_error_must_be_fn = alloc_error_handler must be a function
353b0b11 2
49aad941
FG
3builtin_macros_asm_clobber_abi = clobber_abi
4builtin_macros_asm_clobber_no_reg = asm with `clobber_abi` must specify explicit registers for outputs
5builtin_macros_asm_clobber_outputs = generic outputs
353b0b11 6
49aad941
FG
7builtin_macros_asm_duplicate_arg = duplicate argument named `{$name}`
8 .label = previously here
9 .arg = duplicate argument
10
11builtin_macros_asm_expected_comma = expected token: `,`
12 .label = expected `,`
13
14builtin_macros_asm_expected_other = expected operand, {$is_global_asm ->
15 [true] options
16 *[false] clobber_abi, options
17 }, or additional template string
18
19builtin_macros_asm_explicit_register_name = explicit register arguments cannot have names
20
21builtin_macros_asm_modifier_invalid = asm template modifier must be a single character
22
23builtin_macros_asm_mutually_exclusive = the `{$opt1}` and `{$opt2}` options are mutually exclusive
24
25builtin_macros_asm_noreturn = asm outputs are not allowed with the `noreturn` option
26
27builtin_macros_asm_opt_already_provided = the `{$symbol}` option was already provided
28 .label = this option was already provided
29 .suggestion = remove this option
30
31builtin_macros_asm_pos_after = positional arguments cannot follow named arguments or explicit register arguments
32 .pos = positional argument
33 .named = named argument
34 .explicit = explicit register argument
35
36builtin_macros_asm_pure_combine = the `pure` option must be combined with either `nomem` or `readonly`
37
38builtin_macros_asm_pure_no_output = asm with the `pure` option must have at least one output
39
40builtin_macros_asm_requires_template = requires at least a template string argument
41
42builtin_macros_asm_sym_no_path = expected a path for argument to `sym`
43
44builtin_macros_asm_underscore_input = _ cannot be used for input operands
45
46builtin_macros_assert_missing_comma = unexpected string literal
47 .suggestion = try adding a comma
353b0b11
FG
48
49builtin_macros_assert_requires_boolean = macro requires a boolean expression as an argument
50 .label = boolean expression required
51
52builtin_macros_assert_requires_expression = macro requires an expression as an argument
53 .suggestion = try removing semicolon
54
49aad941
FG
55builtin_macros_bad_derive_target = `derive` may only be applied to `struct`s, `enum`s and `union`s
56 .label = not applicable here
57 .label2 = not a `struct`, `enum` or `union`
58
59builtin_macros_cannot_derive_union = this trait cannot be derived for unions
353b0b11 60
353b0b11
FG
61builtin_macros_cfg_accessible_has_args = `cfg_accessible` path cannot accept arguments
62
63builtin_macros_cfg_accessible_indeterminate = cannot determine whether the path is accessible or not
64
49aad941
FG
65builtin_macros_cfg_accessible_literal_path = `cfg_accessible` path cannot be a literal
66builtin_macros_cfg_accessible_multiple_paths = multiple `cfg_accessible` paths are specified
67builtin_macros_cfg_accessible_unspecified_path = `cfg_accessible` path is not specified
68builtin_macros_concat_bytes_array = cannot concatenate doubly nested array
69 .note = byte strings are treated as arrays of bytes
70 .help = try flattening the array
353b0b11 71
49aad941 72builtin_macros_concat_bytes_bad_repeat = repeat count is not a positive number
353b0b11
FG
73
74builtin_macros_concat_bytes_invalid = cannot concatenate {$lit_kind} literals
75 .byte_char = try using a byte character
76 .byte_str = try using a byte string
77 .number_array = try wrapping the number in an array
78
49aad941
FG
79builtin_macros_concat_bytes_missing_literal = expected a byte literal
80 .note = only byte literals (like `b"foo"`, `b's'` and `[3, 4, 5]`) can be passed to `concat_bytes!()`
353b0b11
FG
81
82builtin_macros_concat_bytes_non_u8 = numeric literal is not a `u8`
83
49aad941 84builtin_macros_concat_bytes_oob = numeric literal is out of bounds
353b0b11 85
49aad941
FG
86builtin_macros_concat_bytestr = cannot concatenate a byte string literal
87
88builtin_macros_concat_idents_ident_args = `concat_idents!()` requires ident args
353b0b11
FG
89
90builtin_macros_concat_idents_missing_args = `concat_idents!()` takes 1 or more arguments
91builtin_macros_concat_idents_missing_comma = `concat_idents!()` expecting comma
49aad941
FG
92builtin_macros_concat_missing_literal = expected a literal
93 .note = only literals (like `"foo"`, `-42` and `3.14`) can be passed to `concat!()`
353b0b11 94
49aad941
FG
95builtin_macros_default_arg = `#[default]` attribute does not accept a value
96 .suggestion = try using `#[default]`
353b0b11 97
49aad941 98builtin_macros_derive_macro_call = `derive` cannot be used on items with type macros
353b0b11
FG
99
100builtin_macros_derive_path_args_list = traits in `#[derive(...)]` don't accept arguments
101 .suggestion = remove the arguments
102
103builtin_macros_derive_path_args_value = traits in `#[derive(...)]` don't accept values
104 .suggestion = remove the value
105
353b0b11
FG
106builtin_macros_env_not_defined = environment variable `{$var}` not defined at compile time
107 .cargo = Cargo sets build script variables at run time. Use `std::env::var("{$var}")` instead
108 .other = use `std::env::var("{$var}")` to read the variable at run time
109
49aad941
FG
110builtin_macros_env_takes_args = `env!()` takes 1 or 2 arguments
111
112builtin_macros_expected_one_cfg_pattern = expected 1 cfg-pattern
353b0b11
FG
113
114builtin_macros_format_duplicate_arg = duplicate argument named `{$ident}`
115 .label1 = previously here
116 .label2 = duplicate argument
117
49aad941
FG
118builtin_macros_format_no_arg_named = there is no argument named `{$name}`
119 .note = did you intend to capture a variable `{$name}` from the surrounding scope?
120 .note2 = to avoid ambiguity, `format_args!` cannot capture variables when the format string is expanded from a macro
121
122builtin_macros_format_pos_mismatch = {$n} positional {$n ->
123 [one] argument
124 *[more] arguments
125 } in format string, but {$desc}
126
353b0b11
FG
127builtin_macros_format_positional_after_named = positional arguments cannot follow named arguments
128 .label = positional arguments must be before named arguments
129 .named_args = named argument
130
49aad941
FG
131builtin_macros_format_requires_string = requires at least a format string argument
132
353b0b11
FG
133builtin_macros_format_string_invalid = invalid format string: {$desc}
134 .label = {$label1} in format string
135 .note = {$note}
136 .second_label = {$label}
137
353b0b11
FG
138builtin_macros_format_unknown_trait = unknown format trait `{$ty}`
139 .note = the only appropriate formatting traits are:
140 - ``, which uses the `Display` trait
141 - `?`, which uses the `Debug` trait
142 - `e`, which uses the `LowerExp` trait
143 - `E`, which uses the `UpperExp` trait
144 - `o`, which uses the `Octal` trait
145 - `p`, which uses the `Pointer` trait
146 - `b`, which uses the `Binary` trait
147 - `x`, which uses the `LowerHex` trait
148 - `X`, which uses the `UpperHex` trait
149 .suggestion = use the `{$trait_name}` trait
150
151builtin_macros_format_unused_arg = {$named ->
152 [true] named argument
153 *[false] argument
154 } never used
155
156builtin_macros_format_unused_args = multiple unused formatting arguments
157 .label = multiple missing formatting specifiers
158
49aad941
FG
159builtin_macros_global_asm_clobber_abi = `clobber_abi` cannot be used with `global_asm!`
160
161builtin_macros_multiple_default_attrs = multiple `#[default]` attributes
162 .note = only one `#[default]` attribute is needed
163 .label = `#[default]` used here
164 .label_again = `#[default]` used again here
165 .help = try removing {$only_one ->
166 [true] this
167 *[false] these
168 }
169
170builtin_macros_multiple_defaults = multiple declared defaults
171 .label = first default
172 .additional = additional default
173 .note = only one variant can be default
174 .suggestion = make `{$ident}` default
175
176builtin_macros_no_default_variant = no default declared
177 .help = make a unit variant default by placing `#[default]` above it
178 .suggestion = make `{$ident}` default
179
180builtin_macros_non_exhaustive_default = default variant must be exhaustive
181 .label = declared `#[non_exhaustive]` here
182 .help = consider a manual implementation of `Default`
183
184builtin_macros_non_unit_default = the `#[default]` attribute may only be used on unit enum variants
185 .help = consider a manual implementation of `Default`
186
187builtin_macros_requires_cfg_pattern =
188 macro requires a cfg-pattern as an argument
189 .label = cfg-pattern required
190
191builtin_macros_sugg = consider using a positional formatting argument instead
192
193builtin_macros_test_bad_fn = {$kind} functions cannot be used for tests
194 .label = `{$kind}` because of this
195
196builtin_macros_test_case_non_item = `#[test_case]` attribute is only allowed on items
197
198builtin_macros_test_runner_invalid = `test_runner` argument must be a path
199builtin_macros_test_runner_nargs = `#![test_runner(..)]` accepts exactly 1 argument
200
201builtin_macros_unexpected_lit = expected path to a trait, found literal
202 .label = not a trait
203 .str_lit = try using `#[derive({$sym})]`
204 .other = for example, write `#[derive(Debug)]` for `Debug`