@@ -3,3 +3,149 @@ builtin_macros_requires_cfg_pattern =
3
3
.label = cfg-pattern required
4
4
5
5
builtin_macros_expected_one_cfg_pattern = expected 1 cfg-pattern
6
+
7
+ builtin_macros_alloc_error_must_be_fn = alloc_error_handler must be a function
8
+
9
+ builtin_macros_assert_requires_boolean = macro requires a boolean expression as an argument
10
+ .label = boolean expression required
11
+
12
+ builtin_macros_assert_requires_expression = macro requires an expression as an argument
13
+ .suggestion = try removing semicolon
14
+
15
+ builtin_macros_assert_missing_comma = unexpected string literal
16
+ .suggestion = try adding a comma
17
+
18
+ builtin_macros_cfg_accessible_unspecified_path = `cfg_accessible` path is not specified
19
+ builtin_macros_cfg_accessible_multiple_paths = multiple `cfg_accessible` paths are specified
20
+ builtin_macros_cfg_accessible_literal_path = `cfg_accessible` path cannot be a literal
21
+ builtin_macros_cfg_accessible_has_args = `cfg_accessible` path cannot accept arguments
22
+
23
+ builtin_macros_cfg_accessible_indeterminate = cannot determine whether the path is accessible or not
24
+
25
+ builtin_macros_concat_bytestr = cannot concatenate a byte string literal
26
+
27
+ builtin_macros_concat_missing_literal = expected a literal
28
+ .note = only literals (like `"foo"`, `-42` and `3.14`) can be passed to `concat!()`
29
+
30
+ builtin_macros_concat_bytes_missing_literal = expected a byte literal
31
+ .note = only byte literals (like `b"foo"`, `b's'` and `[3, 4, 5]`) can be passed to `concat_bytes!()`
32
+
33
+ builtin_macros_concat_bytes_invalid = cannot concatenate { $lit_kind } literals
34
+ .byte_char = try using a byte character
35
+ .byte_str = try using a byte string
36
+ .number_array = try wrapping the number in an array
37
+
38
+ builtin_macros_concat_bytes_oob = numeric literal is out of bounds
39
+
40
+ builtin_macros_concat_bytes_non_u8 = numeric literal is not a `u8`
41
+
42
+ builtin_macros_concat_bytes_array = cannot concatenate doubly nested array
43
+ .note = byte strings are treated as arrays of bytes
44
+ .help = try flattening the array
45
+
46
+ builtin_macros_concat_bytes_bad_repeat = repeat count is not a positive number
47
+
48
+ builtin_macros_concat_idents_missing_args = `concat_idents!()` takes 1 or more arguments
49
+ builtin_macros_concat_idents_missing_comma = `concat_idents!()` expecting comma
50
+ builtin_macros_concat_idents_ident_args = `concat_idents!()` requires ident args
51
+
52
+ builtin_macros_bad_derive_target = `derive` may only be applied to `struct`s, `enum`s and `union`s
53
+ .label = not applicable here
54
+ .label2 = not a `struct`, `enum` or `union`
55
+
56
+ builtin_macros_unexpected_lit = expected path to a trait, found literal
57
+ .label = not a trait
58
+ .str_lit = try using `#[derive({ $sym } )]`
59
+ .other = for example, write `#[derive(Debug)]` for `Debug`
60
+
61
+ builtin_macros_derive_path_args_list = traits in `#[derive(...)]` don't accept arguments
62
+ .suggestion = remove the arguments
63
+
64
+ builtin_macros_derive_path_args_value = traits in `#[derive(...)]` don't accept values
65
+ .suggestion = remove the value
66
+
67
+ builtin_macros_derive_macro_call = `derive` cannot be used on items with type macros
68
+
69
+ builtin_macros_cannot_derive_union = this trait cannot be derived for unions
70
+
71
+ builtin_macros_no_default_variant = no default declared
72
+ .help = make a unit variant default by placing `#[default]` above it
73
+ .suggestion = make `{ $ident } ` default
74
+
75
+ builtin_macros_multiple_defaults = multiple declared defaults
76
+ .label = first default
77
+ .additional = additional default
78
+ .note = only one variant can be default
79
+ .suggestion = make `{ $ident } ` default
80
+
81
+ builtin_macros_non_unit_default = the `#[default]` attribute may only be used on unit enum variants
82
+ .help = consider a manual implementation of `Default`
83
+
84
+ builtin_macros_non_exhaustive_default = default variant must be exhaustive
85
+ .label = declared `#[non_exhaustive]` here
86
+ .help = consider a manual implementation of `Default`
87
+
88
+ builtin_macros_multiple_default_attrs = multiple `#[default]` attributes
89
+ .note = only one `#[default]` attribute is needed
90
+ .label = `#[default]` used here
91
+ .label_again = `#[default]` used again here
92
+ .help = try removing { $only_one ->
93
+ [ true ] this
94
+ *[ false ] these
95
+ }
96
+
97
+ builtin_macros_default_arg = `#[default]` attribute does not accept a value
98
+ .suggestion = try using `#[default]`
99
+
100
+ builtin_macros_env_takes_args = `env!()` takes 1 or 2 arguments
101
+
102
+ builtin_macros_env_not_defined = environment variable `{ $var } ` not defined at compile time
103
+ .cargo = Cargo sets build script variables at run time. Use `std::env::var("{ $var } ")` instead
104
+ .other = use `std::env::var("{ $var } ")` to read the variable at run time
105
+
106
+ builtin_macros_format_requires_string = requires at least a format string argument
107
+
108
+ builtin_macros_format_duplicate_arg = duplicate argument named `{ $ident } `
109
+ .label1 = previously here
110
+ .label2 = duplicate argument
111
+
112
+ builtin_macros_format_positional_after_named = positional arguments cannot follow named arguments
113
+ .label = positional arguments must be before named arguments
114
+ .named_args = named argument
115
+
116
+ builtin_macros_format_string_invalid = invalid format string: { $desc }
117
+ .label = { $label1 } in format string
118
+ .note = { $note }
119
+ .second_label = { $label }
120
+
121
+ builtin_macros_sugg = consider using a positional formatting argument instead
122
+
123
+ builtin_macros_format_no_arg_named = there is no argument named `{ $name } `
124
+ .note = did you intend to capture a variable `{ $name } ` from the surrounding scope?
125
+ .note2 = to avoid ambiguity, `format_args!` cannot capture variables when the format string is expanded from a macro
126
+
127
+ builtin_macros_format_unknown_trait = unknown format trait `{ $ty } `
128
+ .note = the only appropriate formatting traits are:
129
+ - ``, which uses the `Display` trait
130
+ - `?`, which uses the `Debug` trait
131
+ - `e`, which uses the `LowerExp` trait
132
+ - `E`, which uses the `UpperExp` trait
133
+ - `o`, which uses the `Octal` trait
134
+ - `p`, which uses the `Pointer` trait
135
+ - `b`, which uses the `Binary` trait
136
+ - `x`, which uses the `LowerHex` trait
137
+ - `X`, which uses the `UpperHex` trait
138
+ .suggestion = use the `{ $trait_name } ` trait
139
+
140
+ builtin_macros_format_unused_arg = { $named ->
141
+ [ true ] named argument
142
+ *[ false ] argument
143
+ } never used
144
+
145
+ builtin_macros_format_unused_args = multiple unused formatting arguments
146
+ .label = multiple missing formatting specifiers
147
+
148
+ builtin_macros_format_pos_mismatch = { $n } positional { $n ->
149
+ [ one ] argument
150
+ *[ more ] arguments
151
+ } in format string, but { $desc }
0 commit comments